You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AutoRunner bug with AlgoEnsembleBestByFold before setting the num_fold #5665
Describe the bug
AutoRunner will fail if the users first set their ensemble method to AlgoEnsembleBestByFold and then change the num_fold by set_num_fold
To Reproduce
runner=AutoRunner()
runner.set_training_params(train_param) # make it 2 epochs in train_paramrunner.set_ensemble_method("AlgoEnsembleBestByFold")
runner.set_num_fold(1)
runner.run()
Traceback (most recent call last):
File "/workspace/monai/monai-in-dev/tests/test_integration_autorunner.py", line 108, in test_autorunner_ensemble
runner.run()
File "/workspace/monai/monai-in-dev/monai/apps/auto3dseg/auto_runner.py", line 633, in run
preds = ensembler(pred_param=self.pred_params)
File "/workspace/monai/monai-in-dev/monai/apps/auto3dseg/ensemble_builder.py", line 156, in __call__
infer_instance = algo[AlgoEnsembleKeys.ALGO]
TypeError: 'NoneType' object is not subscriptable
Expected behavior
The ensemble method can update itself after users set_num_fold
Activity
fix 5665 (#5667)