Skip to content

Commit

Permalink
Fix null tracker metadata and disable mlflow by default (#18)
Browse files Browse the repository at this point in the history
* fix: return empty tracker metadata when no tracker

* chore: mlflow disabled by default

* chore: update changelog

* Merge develop into fix/null-tracker
  • Loading branch information
gmertes authored Aug 14, 2024
1 parent 6d289fd commit cbd3d07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Keep it human-readable, your future self will thank you!
- Adjusted PyPI release infrastructure to common ECMWF workflow
- Bumped versions in Pre-commit hooks
- Fix crash when logging hyperparameters with missing values in the config
- Fixed "null" tracker metadata when tracking is disabled, now returns an empty dict

### Removed
- Dependency on mlflow-export-import
Expand Down
2 changes: 1 addition & 1 deletion src/anemoi/training/config/diagnostics/eval_rollout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ log:
tensorboard:
enabled: False
mlflow:
enabled: True
enabled: False
offline: False
authentication: False
log_model: False
Expand Down
10 changes: 4 additions & 6 deletions src/anemoi/training/diagnostics/callbacks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,9 @@ def tracker_metadata(self, trainer: pl.Trainer) -> dict:
"url": run.url,
"project": run.project,
}
else:
self._tracker_metadata = {}
return {self._tracker_name: self._tracker_metadata}

elif self.config.diagnostics.log.mlflow.enabled:
if self.config.diagnostics.log.mlflow.enabled:
self._tracker_name = "mlflow"

from anemoi.training.diagnostics.mlflow.logger import AnemoiMLflowLogger
Expand All @@ -808,10 +807,9 @@ def tracker_metadata(self, trainer: pl.Trainer) -> dict:
"url": run.info.artifact_uri,
"project": run.info.experiment_id,
}
else:
self._tracker_metadata = {}
return {self._tracker_name: self._tracker_metadata}

return {self._tracker_name: self._tracker_metadata}
return {}

def _save_checkpoint(self, trainer: pl.Trainer, lightning_checkpoint_filepath: str) -> None:
if trainer.is_global_zero:
Expand Down

0 comments on commit cbd3d07

Please sign in to comment.