predict_from_raw_data.py __main__ block hardcodes Dataset004_Hippocampus (v2.8.1)
Author: SakshiRaCreated Jul 13, 2026Updated Jul 13, 2026
Labelsbugneeds-maintainer
Bug
In nnunetv2/inference/predict_from_raw_data.py (v2.8.1), the if __name__ == '__main__': block contains hardcoded references to Dataset004_Hippocampus (dataset ID, model folder path, etc.)
rather than using predict_entry_point_modelfolder() or argparse.
This means running python -m nnunetv2.inference.predict_from_raw_data directly doesn't work for custom datasets.
Expected Behavior
The __main__ block should call predict_entry_point_modelfolder() (which already exists and uses argparse), e.g.:
if __name__ == '__main__':
from nnunetv2.inference.predict_from_raw_data import predict_entry_point_modelfolder
predict_entry_point_modelfolder()
Workaround
We patch this at Docker build time by replacing the __main__ block.
Environment
- nnunetv2==2.8.1Source: MIC-DKFZ/nnUNet