diff --git a/ci/run_premerge_cpu.sh b/ci/run_premerge_cpu.sh index 1b362a8c..4950bd7d 100755 --- a/ci/run_premerge_cpu.sh +++ b/ci/run_premerge_cpu.sh @@ -30,6 +30,7 @@ elif [[ $# -gt 1 ]]; then fi verify_bundle() { + rm -rf /opt/hostedtoolcache echo 'Run verify bundle...' pip install -r requirements.txt head_ref=$(git rev-parse HEAD) diff --git a/ci/unit_tests/test_brats_mri_axial_slices_generative_diffusion.py b/ci/unit_tests/test_brats_mri_axial_slices_generative_diffusion.py index b5ac192d..fe912f59 100644 --- a/ci/unit_tests/test_brats_mri_axial_slices_generative_diffusion.py +++ b/ci/unit_tests/test_brats_mri_axial_slices_generative_diffusion.py @@ -93,7 +93,7 @@ def test_autoencoder_train(self, override): sys.path = [bundle_root] + sys.path trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train_autoencoder.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -108,7 +108,7 @@ def test_autoencoder_infer(self, override): sys.path = [bundle_root] + sys.path inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference_autoencoder.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -125,7 +125,7 @@ def test_diffusion_train(self, override): diffusion_file = os.path.join(bundle_root, "configs/train_diffusion.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=[autoencoder_file, diffusion_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -140,7 +140,7 @@ def test_diffusion_infer(self, override): sys.path = [bundle_root] + sys.path inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_brats_mri_generative_diffusion.py b/ci/unit_tests/test_brats_mri_generative_diffusion.py index 3a3c460c..0e35db58 100644 --- a/ci/unit_tests/test_brats_mri_generative_diffusion.py +++ b/ci/unit_tests/test_brats_mri_generative_diffusion.py @@ -107,7 +107,7 @@ def test_autoencoder_train(self, override): sys.path = [bundle_root] + sys.path trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train_autoencoder.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -122,7 +122,7 @@ def test_autoencoder_infer(self, override): sys.path = [bundle_root] + sys.path inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference_autoencoder.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -139,7 +139,7 @@ def test_diffusion_train(self, override): diffusion_file = os.path.join(bundle_root, "configs/train_diffusion.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=[autoencoder_file, diffusion_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -154,7 +154,7 @@ def test_diffusion_infer(self, override): sys.path = [bundle_root] + sys.path inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_brats_mri_segmentation.py b/ci/unit_tests/test_brats_mri_segmentation.py index 33b9a84e..91f5bfc8 100644 --- a/ci/unit_tests/test_brats_mri_segmentation.py +++ b/ci/unit_tests/test_brats_mri_segmentation.py @@ -70,7 +70,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -80,7 +80,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -94,7 +94,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_endoscopic_inbody_classification.py b/ci/unit_tests/test_endoscopic_inbody_classification.py index 7313c641..1a3c7d43 100644 --- a/ci/unit_tests/test_endoscopic_inbody_classification.py +++ b/ci/unit_tests/test_endoscopic_inbody_classification.py @@ -72,7 +72,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -82,7 +82,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -96,7 +96,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_endoscopic_tool_segmentation.py b/ci/unit_tests/test_endoscopic_tool_segmentation.py index be74e443..56c7207a 100644 --- a/ci/unit_tests/test_endoscopic_tool_segmentation.py +++ b/ci/unit_tests/test_endoscopic_tool_segmentation.py @@ -71,7 +71,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -81,7 +81,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -95,7 +95,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_lung_nodule_ct_detection.py b/ci/unit_tests/test_lung_nodule_ct_detection.py index aa091475..8c6d9104 100644 --- a/ci/unit_tests/test_lung_nodule_ct_detection.py +++ b/ci/unit_tests/test_lung_nodule_ct_detection.py @@ -86,7 +86,7 @@ def test_train_eval_config(self, override): sys.path.append(bundle_root) trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -96,7 +96,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -111,7 +111,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_pancreas_ct_dints_segmentation.py b/ci/unit_tests/test_pancreas_ct_dints_segmentation.py index 877eacc1..573d34db 100644 --- a/ci/unit_tests/test_pancreas_ct_dints_segmentation.py +++ b/ci/unit_tests/test_pancreas_ct_dints_segmentation.py @@ -127,7 +127,7 @@ def test_train(self, override): train_file = os.path.join(bundle_root, "configs/train.yaml") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -146,7 +146,7 @@ def test_eval(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -161,7 +161,7 @@ def test_infer_config(self, override): arch_name = get_searched_arch(os.path.join(bundle_root, "models")) override["arch_ckpt_path"] = os.path.join(bundle_root, "models", arch_name) inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.yaml"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_pathology_nuclei_classification.py b/ci/unit_tests/test_pathology_nuclei_classification.py index 736ab579..d5df06b8 100644 --- a/ci/unit_tests/test_pathology_nuclei_classification.py +++ b/ci/unit_tests/test_pathology_nuclei_classification.py @@ -99,7 +99,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -109,7 +109,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -124,7 +124,7 @@ def test_infer_config(self, override): sys.path.append(bundle_root) inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_pathology_nuclei_segmentation_classification.py b/ci/unit_tests/test_pathology_nuclei_segmentation_classification.py index b7454d95..148bdfe5 100644 --- a/ci/unit_tests/test_pathology_nuclei_segmentation_classification.py +++ b/ci/unit_tests/test_pathology_nuclei_segmentation_classification.py @@ -87,7 +87,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -97,7 +97,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -111,7 +111,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_pathology_nuclick_annotation.py b/ci/unit_tests/test_pathology_nuclick_annotation.py index 34cd9a45..0d9f064f 100644 --- a/ci/unit_tests/test_pathology_nuclick_annotation.py +++ b/ci/unit_tests/test_pathology_nuclick_annotation.py @@ -99,7 +99,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -109,7 +109,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -124,7 +124,7 @@ def test_infer_config(self, override): sys.path.append(bundle_root) inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_pathology_tumor_detection.py b/ci/unit_tests/test_pathology_tumor_detection.py index 86f11e6c..b613a5cb 100644 --- a/ci/unit_tests/test_pathology_tumor_detection.py +++ b/ci/unit_tests/test_pathology_tumor_detection.py @@ -77,7 +77,7 @@ def test_train_infer_config(self, override, override_infer): train_file = os.path.join(bundle_root, "configs/train.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -89,7 +89,7 @@ def test_train_infer_config(self, override, override_infer): override_infer["dataset_dir"] = self.dataset_dir inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_renalStructures_CECT_segmentation.py b/ci/unit_tests/test_renalStructures_CECT_segmentation.py index 9e0b9fa9..7face44d 100644 --- a/ci/unit_tests/test_renalStructures_CECT_segmentation.py +++ b/ci/unit_tests/test_renalStructures_CECT_segmentation.py @@ -93,7 +93,7 @@ def test_train_config(self, override): sys.path.append(bundle_root) trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -113,7 +113,7 @@ def test_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -127,7 +127,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_spleen_ct_segmentation.py b/ci/unit_tests/test_spleen_ct_segmentation.py index a9bb2c9e..8db1f761 100644 --- a/ci/unit_tests/test_spleen_ct_segmentation.py +++ b/ci/unit_tests/test_spleen_ct_segmentation.py @@ -68,7 +68,7 @@ def test_train_eval_config(self, override): eval_file = os.path.join(bundle_root, "configs/evaluate.json") trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=train_file, logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -78,7 +78,7 @@ def test_train_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -92,7 +92,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_spleen_deepedit_annotation.py b/ci/unit_tests/test_spleen_deepedit_annotation.py index 6a6b1556..fa5da6fa 100644 --- a/ci/unit_tests/test_spleen_deepedit_annotation.py +++ b/ci/unit_tests/test_spleen_deepedit_annotation.py @@ -82,7 +82,7 @@ def test_train_config(self, override): bundle_root = override["bundle_root"] sys.path = [bundle_root] + sys.path trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -99,7 +99,7 @@ def test_eval_config(self, override): sys.path = [bundle_root] + sys.path validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -113,7 +113,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -131,7 +131,7 @@ def test_infer_click_config(self, override): sys.path = [bundle_root] + sys.path inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_swin_unetr_btcv_segmentation.py b/ci/unit_tests/test_swin_unetr_btcv_segmentation.py index 193580cb..a854e204 100644 --- a/ci/unit_tests/test_swin_unetr_btcv_segmentation.py +++ b/ci/unit_tests/test_swin_unetr_btcv_segmentation.py @@ -84,7 +84,7 @@ def test_train_config(self, override): bundle_root = override["bundle_root"] trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -101,7 +101,7 @@ def test_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -115,7 +115,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/test_wholeBody_ct_segmentation.py b/ci/unit_tests/test_wholeBody_ct_segmentation.py index 0001b8f3..c65561b1 100644 --- a/ci/unit_tests/test_wholeBody_ct_segmentation.py +++ b/ci/unit_tests/test_wholeBody_ct_segmentation.py @@ -80,7 +80,7 @@ def test_train_config(self, override): bundle_root = override["bundle_root"] trainer = ConfigWorkflow( - workflow="train", + workflow_type="train", config_file=os.path.join(bundle_root, "configs/train.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -97,7 +97,7 @@ def test_eval_config(self, override): validator = ConfigWorkflow( # override train.json, thus set the workflow to "train" rather than "eval" - workflow="train", + workflow_type="train", config_file=[train_file, eval_file], logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), @@ -111,7 +111,7 @@ def test_infer_config(self, override): bundle_root = override["bundle_root"] inferrer = ConfigWorkflow( - workflow="infer", + workflow_type="infer", config_file=os.path.join(bundle_root, "configs/inference.json"), logging_file=os.path.join(bundle_root, "configs/logging.conf"), meta_file=os.path.join(bundle_root, "configs/metadata.json"), diff --git a/ci/unit_tests/utils.py b/ci/unit_tests/utils.py index 24752495..ebd1137a 100644 --- a/ci/unit_tests/utils.py +++ b/ci/unit_tests/utils.py @@ -49,7 +49,7 @@ def export_config_and_run_mgpu_cmd( logging_file, override_dict, output_path, - workflow="train", + workflow_type="train", nnode=1, ngpu=2, check_config=False, @@ -63,7 +63,7 @@ def export_config_and_run_mgpu_cmd( export_overrided_config(config_file=config_file, override_dict=override_dict, output_path=output_path) if check_config is True: engine = ConfigWorkflow( - workflow=workflow, config_file=output_path, logging_file=logging_file, meta_file=meta_file + workflow_type=workflow_type, config_file=output_path, logging_file=logging_file, meta_file=meta_file ) engine.initialize() check_result = engine.check_properties() diff --git a/models/brats_mri_axial_slices_generative_diffusion/configs/inference_autoencoder.json b/models/brats_mri_axial_slices_generative_diffusion/configs/inference_autoencoder.json index b31a3ea4..652ac74e 100644 --- a/models/brats_mri_axial_slices_generative_diffusion/configs/inference_autoencoder.json +++ b/models/brats_mri_axial_slices_generative_diffusion/configs/inference_autoencoder.json @@ -63,8 +63,9 @@ "func": "$lambda x: x[@channel, :, :, :]" }, { - "_target_": "AddChanneld", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": "no_channel" }, { "_target_": "EnsureTyped", diff --git a/models/brats_mri_axial_slices_generative_diffusion/configs/metadata.json b/models/brats_mri_axial_slices_generative_diffusion/configs/metadata.json index 19be69af..554e3407 100644 --- a/models/brats_mri_axial_slices_generative_diffusion/configs/metadata.json +++ b/models/brats_mri_axial_slices_generative_diffusion/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_generator_ldm_20230507.json", - "version": "1.0.6", + "version": "1.0.7", "changelog": { + "1.0.7": "update AddChanneld with EnsureChannelFirstd", "1.0.6": "update with new lr scheduler api in inference", "1.0.5": "fix the wrong GPU index issue of multi-node", "1.0.4": "update with new lr scheduler api", @@ -10,7 +11,7 @@ "1.0.1": "fix inference folder error", "1.0.0": "Initial release" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/brats_mri_axial_slices_generative_diffusion/configs/train_autoencoder.json b/models/brats_mri_axial_slices_generative_diffusion/configs/train_autoencoder.json index af948159..ba72e3fb 100644 --- a/models/brats_mri_axial_slices_generative_diffusion/configs/train_autoencoder.json +++ b/models/brats_mri_axial_slices_generative_diffusion/configs/train_autoencoder.json @@ -89,8 +89,9 @@ "func": "$lambda x: x[@channel, :, :, :]" }, { - "_target_": "AddChanneld", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": "no_channel" }, { "_target_": "EnsureTyped", diff --git a/models/brats_mri_generative_diffusion/configs/inference_autoencoder.json b/models/brats_mri_generative_diffusion/configs/inference_autoencoder.json index 9fc3c1b5..eb66dee2 100644 --- a/models/brats_mri_generative_diffusion/configs/inference_autoencoder.json +++ b/models/brats_mri_generative_diffusion/configs/inference_autoencoder.json @@ -66,8 +66,9 @@ "func": "$lambda x: x[@channel, :, :, :]" }, { - "_target_": "AddChanneld", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": "no_channel" }, { "_target_": "EnsureTyped", diff --git a/models/brats_mri_generative_diffusion/configs/metadata.json b/models/brats_mri_generative_diffusion/configs/metadata.json index c5a22d79..b5e2158c 100644 --- a/models/brats_mri_generative_diffusion/configs/metadata.json +++ b/models/brats_mri_generative_diffusion/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_generator_ldm_20230507.json", - "version": "1.0.6", + "version": "1.0.7", "changelog": { + "1.0.7": "update with EnsureChannelFirstd", "1.0.6": "update with new lr scheduler api in inference", "1.0.5": "fix the wrong GPU index issue of multi-node", "1.0.4": "update with new lr scheduler api", @@ -10,7 +11,7 @@ "1.0.1": "update dependency, update trained model weights", "1.0.0": "Initial release" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/brats_mri_generative_diffusion/configs/train_autoencoder.json b/models/brats_mri_generative_diffusion/configs/train_autoencoder.json index 28136f51..ddaa8c41 100644 --- a/models/brats_mri_generative_diffusion/configs/train_autoencoder.json +++ b/models/brats_mri_generative_diffusion/configs/train_autoencoder.json @@ -96,8 +96,9 @@ "func": "$lambda x: x[@channel, :, :, :]" }, { - "_target_": "AddChanneld", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": "no_channel" }, { "_target_": "EnsureTyped", diff --git a/models/breast_density_classification/configs/inference.json b/models/breast_density_classification/configs/inference.json index 5cedb121..f85d30f8 100644 --- a/models/breast_density_classification/configs/inference.json +++ b/models/breast_density_classification/configs/inference.json @@ -95,7 +95,7 @@ { "_target_": "ClassificationSaver", "output_dir": "@output_dir", - "batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])", + "batch_transform": "$lambda x: [xx['image'].meta for xx in x]", "output_transform": "$monai.handlers.from_engine(['pred'])" } ], diff --git a/models/breast_density_classification/configs/metadata.json b/models/breast_density_classification/configs/metadata.json index 17ddddee..1cba67b3 100644 --- a/models/breast_density_classification/configs/metadata.json +++ b/models/breast_density_classification/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.1.5", + "version": "0.1.6", "changelog": { + "0.1.6": "Remove meta dict usage", "0.1.5": "Fixed duplication of input output format section", "0.1.4": "Changed Readme", "0.1.3": "Change input_dim from 229 to 299", @@ -9,11 +10,11 @@ "0.1.1": "update license files", "0.1.0": "complete the model package" }, - "monai_version": "1.0.0", - "pytorch_version": "1.12.1", - "numpy_version": "1.21.2", + "monai_version": "1.3.0", + "pytorch_version": "1.13.1", + "numpy_version": "1.22.2", "optional_packages_version": { - "torchvision": "0.13.1" + "torchvision": "0.14.1" }, "name": "Breast density classification", "task": "Breast Density Classification", diff --git a/models/endoscopic_inbody_classification/configs/evaluate.json b/models/endoscopic_inbody_classification/configs/evaluate.json index bd60b9ae..ed5f9453 100644 --- a/models/endoscopic_inbody_classification/configs/evaluate.json +++ b/models/endoscopic_inbody_classification/configs/evaluate.json @@ -37,7 +37,7 @@ "metric_details": [ "val_accu" ], - "batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])", + "batch_transform": "$lambda x: [xx['image'].meta for xx in x]", "summary_ops": "*" } ], diff --git a/models/endoscopic_inbody_classification/configs/inference.json b/models/endoscopic_inbody_classification/configs/inference.json index 59d8e9f3..b298eb7c 100644 --- a/models/endoscopic_inbody_classification/configs/inference.json +++ b/models/endoscopic_inbody_classification/configs/inference.json @@ -25,8 +25,9 @@ "keys": "image" }, { - "_target_": "AsChannelFirstd", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": -1 }, { "_target_": "Resized", diff --git a/models/endoscopic_inbody_classification/configs/metadata.json b/models/endoscopic_inbody_classification/configs/metadata.json index 6332e6b8..baedebf1 100644 --- a/models/endoscopic_inbody_classification/configs/metadata.json +++ b/models/endoscopic_inbody_classification/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.4.4", + "version": "0.4.5", "changelog": { + "0.4.5": "update with EnsureChannelFirstd and remove meta dict usage", "0.4.4": "fix the wrong GPU index issue of multi-node", "0.4.3": "add dataset dir example", "0.4.2": "update ONNX-TensorRT descriptions", @@ -23,7 +24,7 @@ "0.1.0": "complete the first version model package", "0.0.1": "initialize the model package structure" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/endoscopic_inbody_classification/configs/train.json b/models/endoscopic_inbody_classification/configs/train.json index b7c047ab..22f105a9 100644 --- a/models/endoscopic_inbody_classification/configs/train.json +++ b/models/endoscopic_inbody_classification/configs/train.json @@ -44,8 +44,9 @@ "keys": "label" }, { - "_target_": "AsChannelFirstd", - "keys": "image" + "_target_": "EnsureChannelFirstd", + "keys": "image", + "channel_dim": -1 }, { "_target_": "Resized", diff --git a/models/lung_nodule_ct_detection/configs/evaluate.json b/models/lung_nodule_ct_detection/configs/evaluate.json index 2597dbe2..5dc8c39a 100644 --- a/models/lung_nodule_ct_detection/configs/evaluate.json +++ b/models/lung_nodule_ct_detection/configs/evaluate.json @@ -37,7 +37,7 @@ "metric_details": [ "val_coco" ], - "batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])", + "batch_transform": "$lambda x: [xx['image'].meta for xx in x]", "summary_ops": "*" } ], diff --git a/models/lung_nodule_ct_detection/configs/inference.json b/models/lung_nodule_ct_detection/configs/inference.json index 95e436e6..7d261761 100644 --- a/models/lung_nodule_ct_detection/configs/inference.json +++ b/models/lung_nodule_ct_detection/configs/inference.json @@ -83,21 +83,18 @@ { "_target_": "LoadImaged", "keys": "image", - "meta_key_postfix": "meta_dict", "_disabled_": "@whether_raw_luna16" }, { "_target_": "LoadImaged", "keys": "image", - "meta_key_postfix": "meta_dict", "reader": "itkreader", "affine_lps_to_ras": true, "_disabled_": "@whether_resampled_luna16" }, { "_target_": "EnsureChannelFirstd", - "keys": "image", - "meta_key_postfix": "meta_dict" + "keys": "image" }, { "_target_": "Orientationd", @@ -161,7 +158,6 @@ "_target_": "AffineBoxToWorldCoordinated", "box_keys": "box", "box_ref_image_keys": "image", - "image_meta_key_postfix": "meta_dict", "affine_lps_to_ras": true }, { @@ -194,7 +190,7 @@ "_target_": "scripts.detection_saver.DetectionSaver", "output_dir": "@output_dir", "filename": "result_luna16_fold0.json", - "batch_transform": "$lambda x: [xx['image_meta_dict'] for xx in x]", + "batch_transform": "$lambda x: [xx['image'].meta for xx in x]", "output_transform": "$lambda x: [@postprocessing({**xx['pred'],'image':xx['image']}) for xx in x]", "pred_box_key": "box", "pred_label_key": "label", diff --git a/models/lung_nodule_ct_detection/configs/metadata.json b/models/lung_nodule_ct_detection/configs/metadata.json index 98625070..6c4d2fba 100644 --- a/models/lung_nodule_ct_detection/configs/metadata.json +++ b/models/lung_nodule_ct_detection/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.5.9", + "version": "0.6.0", "changelog": { + "0.6.0": "remove meta_dict usage", "0.5.9": "use monai 1.2.0", "0.5.8": "update TRT memory requirement in readme", "0.5.7": "add dataset dir example", @@ -23,7 +24,7 @@ "0.1.1": "add reference for LIDC dataset", "0.1.0": "complete the model package" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/lung_nodule_ct_detection/configs/train.json b/models/lung_nodule_ct_detection/configs/train.json index a5455472..8678889d 100644 --- a/models/lung_nodule_ct_detection/configs/train.json +++ b/models/lung_nodule_ct_detection/configs/train.json @@ -103,13 +103,11 @@ "preprocessing_transforms": [ { "_target_": "LoadImaged", - "keys": "image", - "meta_key_postfix": "meta_dict" + "keys": "image" }, { "_target_": "EnsureChannelFirstd", - "keys": "image", - "meta_key_postfix": "meta_dict" + "keys": "image" }, { "_target_": "EnsureTyped", @@ -146,7 +144,6 @@ "_target_": "AffineBoxToImageCoordinated", "box_keys": "box", "box_ref_image_keys": "image", - "image_meta_key_postfix": "meta_dict", "affine_lps_to_ras": true } ], diff --git a/models/multi_organ_segmentation/configs/metadata.json b/models/multi_organ_segmentation/configs/metadata.json index b5b547a9..d7ba2f47 100644 --- a/models/multi_organ_segmentation/configs/metadata.json +++ b/models/multi_organ_segmentation/configs/metadata.json @@ -1,12 +1,13 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.0.3", + "version": "0.0.4", "changelog": { - "0.0.1": "initialize the model package structure", + "0.0.4": "Set image_only to False", + "0.0.3": "Update for stable MONAI version", "0.0.2": "Retrain with new MONAI", - "0.0.3": "Update for stable MONAI version" + "0.0.1": "initialize the model package structure" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/multi_organ_segmentation/configs/search.yaml b/models/multi_organ_segmentation/configs/search.yaml index f3fff4d6..5bcc622f 100644 --- a/models/multi_organ_segmentation/configs/search.yaml +++ b/models/multi_organ_segmentation/configs/search.yaml @@ -38,6 +38,7 @@ transform_train: keys: - "@image_key" - "@label_key" + image_only: false - _target_: EnsureChannelFirstd keys: - "@image_key" diff --git a/models/multi_organ_segmentation/configs/train.yaml b/models/multi_organ_segmentation/configs/train.yaml index ac0e050e..a9a1ca6f 100644 --- a/models/multi_organ_segmentation/configs/train.yaml +++ b/models/multi_organ_segmentation/configs/train.yaml @@ -66,6 +66,7 @@ train: keys: - "@image_key" - "@label_key" + image_only: false - _target_: EnsureChannelFirstd keys: - "@image_key" diff --git a/models/pancreas_ct_dints_segmentation/configs/metadata.json b/models/pancreas_ct_dints_segmentation/configs/metadata.json index 6c4f02b5..05717126 100644 --- a/models/pancreas_ct_dints_segmentation/configs/metadata.json +++ b/models/pancreas_ct_dints_segmentation/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.4.4", + "version": "0.4.5", "changelog": { + "0.4.5": "set image_only to False", "0.4.4": "update the benchmark results of TensorRT", "0.4.3": "add support for TensorRT conversion and inference", "0.4.2": "update search function to match monai 1.2", @@ -22,7 +23,7 @@ "0.1.0": "complete the model package", "0.0.1": "initialize the model package structure" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/pancreas_ct_dints_segmentation/configs/train.yaml b/models/pancreas_ct_dints_segmentation/configs/train.yaml index a5505fb5..e5551a7e 100644 --- a/models/pancreas_ct_dints_segmentation/configs/train.yaml +++ b/models/pancreas_ct_dints_segmentation/configs/train.yaml @@ -66,6 +66,7 @@ train: keys: - "@image_key" - "@label_key" + image_only: false - _target_: EnsureChannelFirstd keys: - "@image_key" diff --git a/models/pathology_nuclei_classification/configs/inference.json b/models/pathology_nuclei_classification/configs/inference.json index 20832e97..5de8fee3 100644 --- a/models/pathology_nuclei_classification/configs/inference.json +++ b/models/pathology_nuclei_classification/configs/inference.json @@ -28,7 +28,8 @@ "image", "label" ], - "dtype": "uint8" + "dtype": "uint8", + "image_only": false }, { "_target_": "EnsureChannelFirstd", diff --git a/models/pathology_nuclei_classification/configs/metadata.json b/models/pathology_nuclei_classification/configs/metadata.json index 55ff958e..bc2ce7a7 100644 --- a/models/pathology_nuclei_classification/configs/metadata.json +++ b/models/pathology_nuclei_classification/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json", - "version": "0.1.5", + "version": "0.1.6", "changelog": { + "0.1.6": "set image_only to False", "0.1.5": "add support for TensorRT conversion and inference", "0.1.4": "fix the wrong GPU index issue of multi-node", "0.1.3": "remove error dollar symbol in readme", @@ -18,7 +19,7 @@ "0.0.2": "Update The Torch Vision Transform", "0.0.1": "initialize the model package structure" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": { diff --git a/models/pathology_nuclei_classification/configs/train.json b/models/pathology_nuclei_classification/configs/train.json index 46ef491f..517d7423 100644 --- a/models/pathology_nuclei_classification/configs/train.json +++ b/models/pathology_nuclei_classification/configs/train.json @@ -47,7 +47,8 @@ "image", "label" ], - "dtype": "uint8" + "dtype": "uint8", + "image_only": false }, { "_target_": "EnsureChannelFirstd", @@ -232,7 +233,8 @@ "image", "label" ], - "dtype": "uint8" + "dtype": "uint8", + "image_only": false }, { "_target_": "EnsureChannelFirstd", diff --git a/models/pathology_nuclei_segmentation_classification/configs/evaluate.json b/models/pathology_nuclei_segmentation_classification/configs/evaluate.json index e0888be1..f98faa23 100644 --- a/models/pathology_nuclei_segmentation_classification/configs/evaluate.json +++ b/models/pathology_nuclei_segmentation_classification/configs/evaluate.json @@ -102,7 +102,7 @@ "metric_details": [ "val_mean_dice" ], - "batch_transform": "$monai.handlers.from_engine(['image_meta_dict'])", + "batch_transform": "$lambda x: [xx['image'].meta for xx in x]", "summary_ops": "*" } ], diff --git a/models/pathology_nuclei_segmentation_classification/configs/metadata.json b/models/pathology_nuclei_segmentation_classification/configs/metadata.json index dbff4483..0e107d80 100644 --- a/models/pathology_nuclei_segmentation_classification/configs/metadata.json +++ b/models/pathology_nuclei_segmentation_classification/configs/metadata.json @@ -1,7 +1,8 @@ { "schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_hovernet_20221124.json", - "version": "0.2.2", + "version": "0.2.3", "changelog": { + "0.2.3": "remove meta_dict usage", "0.2.2": "add requiremnts for torchvision", "0.2.1": "fix the wrong GPU index issue of multi-node", "0.2.0": "Update README for how to download dataset", @@ -16,7 +17,7 @@ "0.1.1": "update to use monai 1.1.0", "0.1.0": "complete the model package" }, - "monai_version": "1.2.0", + "monai_version": "1.3.0", "pytorch_version": "1.13.1", "numpy_version": "1.22.2", "optional_packages_version": {