From 6062956375ed6ac47cc3c61ee99dfcaa6d0f43b9 Mon Sep 17 00:00:00 2001 From: Daniel Coelho de Castro Date: Thu, 11 Nov 2021 18:51:35 +0000 Subject: [PATCH 1/2] Allow overriding experiment_name --- InnerEye/ML/deep_learning_config.py | 3 +++ InnerEye/ML/runner.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/InnerEye/ML/deep_learning_config.py b/InnerEye/ML/deep_learning_config.py index 4a8161045..03fd1f45a 100644 --- a/InnerEye/ML/deep_learning_config.py +++ b/InnerEye/ML/deep_learning_config.py @@ -222,6 +222,9 @@ class WorkflowParams(param.Parameterized): local_weights_path: List[Path] = param.List(default=[], class_=Path, doc="A list of checkpoints paths to use for inference, " "when the job is running outside Azure.") + experiment_name: str = param.String(default="", + doc="If provided, overrides the default AzureML experiment name " + "based on the current Git branch.") model_id: str = param.String(default="", doc="A model id string in the form 'model name:version' " "to use a registered model for inference.") diff --git a/InnerEye/ML/runner.py b/InnerEye/ML/runner.py index 036ec1ad9..9d1454a34 100755 --- a/InnerEye/ML/runner.py +++ b/InnerEye/ML/runner.py @@ -296,6 +296,8 @@ def after_submission_hook(azure_run: Run) -> None: if not self.azure_config.cluster: raise ValueError("self.azure_config.cluster not set, but we need a compute_cluster_name to submit" "the script to run in AzureML") + experiment_name = self.lightning_container.experiment_name \ + or create_experiment_name(self.azure_config) azure_run_info = submit_to_azure_if_needed( entry_script=source_config.entry_script, snapshot_root_directory=source_config.root_folder, @@ -305,7 +307,7 @@ def after_submission_hook(azure_run: Run) -> None: compute_cluster_name=self.azure_config.cluster, environment_variables=source_config.environment_variables, default_datastore=self.azure_config.azureml_datastore, - experiment_name=to_azure_friendly_string(create_experiment_name(self.azure_config)), + experiment_name=to_azure_friendly_string(experiment_name), max_run_duration=self.azure_config.max_run_duration, input_datasets=input_datasets, num_nodes=self.azure_config.num_nodes, From d34c90f3d223e89e3d06093ee71a7e4df6a763e8 Mon Sep 17 00:00:00 2001 From: Daniel Coelho de Castro Date: Thu, 11 Nov 2021 19:12:06 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42dcd578f..0cef318cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ jobs that run in AzureML. `NIH_COVID_BYOL` to specify the name of the SSL training dataset. - ([#560](https://github.com/microsoft/InnerEye-DeepLearning/pull/560)) Added pre-commit hooks. - ([#559](https://github.com/microsoft/InnerEye-DeepLearning/pull/559)) Adding the accompanying code for the ["Active label cleaning: Improving dataset quality under resource constraints"](https://arxiv.org/abs/2109.00574) paper. The code can be found in the [InnerEye-DataQuality](InnerEye-DataQuality/README.md) subfolder. It provides tools for training noise robust models, running label cleaning simulation and loading our label cleaning benchmark datasets. +- ([#583](https://github.com/microsoft/InnerEye-DeepLearning/pull/583)) Allow overriding `experiment_name` for AzureML runs. ### Changed - ([#531](https://github.com/microsoft/InnerEye-DeepLearning/pull/531)) Updated PL to 1.3.8, torchmetrics and pl-bolts and changed relevant metrics and SSL code API.