From d1cecb8c94ed7e19f63fdeeaeec886e8f3ed5fbb Mon Sep 17 00:00:00 2001 From: sahahner Date: Fri, 1 Nov 2024 12:01:54 +0100 Subject: [PATCH 1/4] fix: enable learningrate monitor automatically --- CHANGELOG.md | 1 + src/anemoi/training/diagnostics/callbacks/__init__.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f21209f9..4b1f5698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Keep it human-readable, your future self will thank you! ### Fixed - Refactored callbacks. [#60](https://github.com/ecmwf/anemoi-training/pulls/60) - Updated docs [#115](https://github.com/ecmwf/anemoi-training/pull/115) + - Fix enabling LearningRateMonitor - Refactored rollout [#87](https://github.com/ecmwf/anemoi-training/pulls/87) - Enable longer validation rollout than training ### Added diff --git a/src/anemoi/training/diagnostics/callbacks/__init__.py b/src/anemoi/training/diagnostics/callbacks/__init__.py index 4b0921f1..1e3e10db 100644 --- a/src/anemoi/training/diagnostics/callbacks/__init__.py +++ b/src/anemoi/training/diagnostics/callbacks/__init__.py @@ -30,8 +30,7 @@ def nestedget(conf: DictConfig, key, default): - """ - Get a nested key from a DictConfig object + """Get a nested key from a DictConfig object E.g. >>> nestedget(config, "diagnostics.log.wandb.enabled", False) @@ -49,8 +48,8 @@ def nestedget(conf: DictConfig, key, default): CONFIG_ENABLED_CALLBACKS: list[tuple[list[str] | str | Callable[[DictConfig], bool], type[Callback]]] = [ ("training.swa.enabled", StochasticWeightAveraging), ( - lambda config: nestedget(config, "diagnostics.log.wandb.enabled", False) - or nestedget(config, "diagnostics.log.mflow.enabled", False), + lambda config: nestedget(config, "diagnostics.log.wandb.enabled", True) + or nestedget(config, "diagnostics.log.mflow.enabled", True), LearningRateMonitor, ), ] From 7d8713f4fc845357e4714f83505934b31c0abc65 Mon Sep 17 00:00:00 2001 From: Sara Hahner <44293258+sahahner@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:05:57 +0100 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b1f5698..124ccf50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ Keep it human-readable, your future self will thank you! ### Fixed - Refactored callbacks. [#60](https://github.com/ecmwf/anemoi-training/pulls/60) - Updated docs [#115](https://github.com/ecmwf/anemoi-training/pull/115) - - Fix enabling LearningRateMonitor + - Fix enabling LearningRateMonitor [#119](https://github.com/ecmwf/anemoi-training/pull/119) - Refactored rollout [#87](https://github.com/ecmwf/anemoi-training/pulls/87) - Enable longer validation rollout than training ### Added From 0168676615357151894efb2fb06b4b633c1ca109 Mon Sep 17 00:00:00 2001 From: sahahner Date: Fri, 1 Nov 2024 12:31:22 +0100 Subject: [PATCH 3/4] typo: enable learningrate monitor automatically --- src/anemoi/training/diagnostics/callbacks/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anemoi/training/diagnostics/callbacks/__init__.py b/src/anemoi/training/diagnostics/callbacks/__init__.py index 1e3e10db..9aeda4da 100644 --- a/src/anemoi/training/diagnostics/callbacks/__init__.py +++ b/src/anemoi/training/diagnostics/callbacks/__init__.py @@ -48,8 +48,8 @@ def nestedget(conf: DictConfig, key, default): CONFIG_ENABLED_CALLBACKS: list[tuple[list[str] | str | Callable[[DictConfig], bool], type[Callback]]] = [ ("training.swa.enabled", StochasticWeightAveraging), ( - lambda config: nestedget(config, "diagnostics.log.wandb.enabled", True) - or nestedget(config, "diagnostics.log.mflow.enabled", True), + lambda config: nestedget(config, "diagnostics.log.wandb.enabled", False) + or nestedget(config, "diagnostics.log.mlfow.enabled", False), LearningRateMonitor, ), ] From edc1c45f593a2556853ae0403788dfae2beabe33 Mon Sep 17 00:00:00 2001 From: sahahner Date: Fri, 1 Nov 2024 12:41:16 +0100 Subject: [PATCH 4/4] typo: enable learningrate monitor automatically --- src/anemoi/training/diagnostics/callbacks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anemoi/training/diagnostics/callbacks/__init__.py b/src/anemoi/training/diagnostics/callbacks/__init__.py index 9aeda4da..3968da77 100644 --- a/src/anemoi/training/diagnostics/callbacks/__init__.py +++ b/src/anemoi/training/diagnostics/callbacks/__init__.py @@ -49,7 +49,7 @@ def nestedget(conf: DictConfig, key, default): ("training.swa.enabled", StochasticWeightAveraging), ( lambda config: nestedget(config, "diagnostics.log.wandb.enabled", False) - or nestedget(config, "diagnostics.log.mlfow.enabled", False), + or nestedget(config, "diagnostics.log.mlflow.enabled", False), LearningRateMonitor, ), ]