Skip to content

fix: make test_statistics_extra_prediction_paths pass on totalseg_v3 - #646

Open
harshpatel wants to merge 1 commit into
wasserth:totalseg_v3from
harshpatel:fix/v3-research-utils-test
Open

harshpatel wants to merge 1 commit into
wasserth:totalseg_v3from
harshpatel:fix/v3-research-utils-test

Conversation

@harshpatel

Copy link
Copy Markdown
Contributor

"Run detailed tests" has failed on every push to totalseg_v3 since Oct 6 (last passed on Oct 2). The cause is one test, not the package code.

The cause

test_statistics_extra_prediction_paths came from master in #621. It mocks nnUNetv2_predict. On totalseg_v3, normal inference runs in memory and no longer calls that function, so nnU-Net tries to build the real predictor and stops with "Could not find a dataset with the ID 831". The test has 12 parametrized cases and all 12 fail. The other 2 tests in tests/test_research_utils.py pass.

The change

tests/test_research_utils.py only. The mock now replaces the in-memory steps (_build_nnunetv2_predictor, _initialize_nnunetv2_predictor, _create_nnunetv2_predictor, _preprocessing_signature, _preprocess_nnunet_array, and _predict_preprocessed_nnunet_array) and returns the same synthetic spleen mask as before. The assertions are unchanged.

Testing

tests/tests.sh stops at the first failure, so the steps after this test have not run on this branch since Oct 2. I did not run them because they need the weights and a license. Something further down may still fail.

If you would rather remove this test on totalseg_v3, feel free to close this PR.

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