Commit b9ce1a39 authored by mibaumgartner's avatar mibaumgartner
Browse files

move dynamic task name

parent 470ef323
...@@ -341,6 +341,7 @@ if __name__ == '__main__': ...@@ -341,6 +341,7 @@ if __name__ == '__main__':
save_seg = args.save_seg save_seg = args.save_seg
save_iseg = args.save_iseg save_iseg = args.save_iseg
if task is None:
# select corresponding nnDetection task # select corresponding nnDetection task
nnunet_dir = nnunet_dirs[0] nnunet_dir = nnunet_dirs[0]
task_names = [n for n in PurePath(nnunet_dir).parts if "Task" in n] task_names = [n for n in PurePath(nnunet_dir).parts if "Task" in n]
...@@ -349,11 +350,11 @@ if __name__ == '__main__': ...@@ -349,11 +350,11 @@ if __name__ == '__main__':
logger.info(f"Found nnunet task {task_names[-1]} in nnunet path") logger.info(f"Found nnunet task {task_names[-1]} in nnunet path")
nnunet_task = task_names[-1] nnunet_task = task_names[-1]
if task is None:
logger.info(f"Using nnunet task {nnunet_task} as detection task id") logger.info(f"Using nnunet task {nnunet_task} as detection task id")
task = nnunet_task task = nnunet_task
else: else:
task = get_task(task, name=True) task = get_task(task, name=True)
task_dir = Path(os.getenv("det_models")) / task task_dir = Path(os.getenv("det_models")) / task
initialize_config_module(config_module="nndet.conf") initialize_config_module(config_module="nndet.conf")
cfg = compose(task, "config.yaml", overrides=[]) cfg = compose(task, "config.yaml", overrides=[])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment