Skip to content

Commit

Permalink
Merge branch 'dev' into update-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wyli authored Oct 13, 2023
2 parents 7e20dc0 + 340e65a commit 445347e
Show file tree
Hide file tree
Showing 44 changed files with 120 additions and 105 deletions.
1 change: 1 addition & 0 deletions ci/run_premerge_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
8 changes: 4 additions & 4 deletions ci/unit_tests/test_brats_mri_generative_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_brats_mri_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_endoscopic_inbody_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_endoscopic_tool_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_lung_nodule_ct_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_pancreas_ct_dints_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_pathology_nuclei_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_pathology_nuclick_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions ci/unit_tests/test_pathology_tumor_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_renalStructures_CECT_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
6 changes: 3 additions & 3 deletions ci/unit_tests/test_spleen_ct_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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"),
Expand All @@ -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"),
Expand Down
Loading

0 comments on commit 445347e

Please sign in to comment.