Skip to content

init commit to fix speed issues with mimic3 test cases#607

Merged
jhnwu3 merged 1 commit intomasterfrom
fix/test_cases_slow
Nov 13, 2025
Merged

init commit to fix speed issues with mimic3 test cases#607
jhnwu3 merged 1 commit intomasterfrom
fix/test_cases_slow

Conversation

@jhnwu3
Copy link
Collaborator

@jhnwu3 jhnwu3 commented Nov 13, 2025

This pull request refactors the MIMIC-III dataset test suites to use local test resources instead of downloading data from PhysioNet, and enhances the test output with informative logging and improved assertions. The changes simplify setup and teardown procedures, improve reliability, and make test results easier to interpret.

Test setup and data source changes:

  • Both test_mimic3.py and test_mimic3_mortality_prediction.py now use a local path (test-resources/core/mimic3demo) for the MIMIC-III demo dataset, removing all code related to downloading, extracting, and cleaning up remote data. This makes tests faster and more reliable. [1] [2]

Logging and output improvements:

  • Added detailed print statements to test setup and each test method, including dataset file listings, patient/event counts, and sample data structures, making test execution more transparent and easier to debug. [1] [2] [3]

Test logic and assertions:

  • Improved assertions and output in mortality prediction tests, including checks for sample structure, binary mortality labels, and a summary of mortality label distribution among generated samples.

Simplification and cleanup:

  • Removed unnecessary imports (tempfile, shutil, subprocess) and related code from both test files, streamlining the test codebase. [1] [2]

Test coverage adjustments:

  • Skipped the multimodal mortality prediction test since noteevents are not included in the local test resources, clarifying the scope of the test suite.

@jhnwu3 jhnwu3 merged commit c6e2d54 into master Nov 13, 2025
1 check passed
@jhnwu3 jhnwu3 deleted the fix/test_cases_slow branch November 13, 2025 19:42
dalloliogm pushed a commit to dalloliogm/PyHealth that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant