Skip to content

Commit 7c0b10e

Browse files
Fix bundle_root for NNIGen (#7586)
Fixes #7585 . ### Description Because the NNI test takes too much time, the previous behavior did not get caught with the dry-run mode of HPO Gen ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). --------- Signed-off-by: Mingxin Zheng <mingxinz@nvidia.com> Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent ba3c72c commit 7c0b10e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

monai/apps/auto3dseg/hpo_gen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def generate(self, output_folder: str = ".") -> None:
193193
self.obj_filename = os.path.join(write_path, "algo_object.pkl")
194194

195195
if isinstance(self.algo, BundleAlgo):
196-
self.algo.export_to_disk(output_folder, task_prefix + task_id, fill_with_datastats=False)
196+
self.algo.export_to_disk(
197+
output_folder, task_prefix + task_id, bundle_root=write_path, fill_with_datastats=False
198+
)
197199
else:
198200
ConfigParser.export_config_file(self.params, write_path)
199201
logger.info(write_path)

tests/test_auto3dseg_hpo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_get_history(self) -> None:
181181

182182
NNIGen().run_algo(obj_filename, self.work_dir)
183183
history = import_bundle_algo_history(self.work_dir, only_trained=True)
184-
assert len(history) == 3
184+
assert len(history) == 1
185185

186186
def tearDown(self) -> None:
187187
self.test_dir.cleanup()

0 commit comments

Comments
 (0)