Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Jul 10, 2024
1 parent b0beb3b commit 0fb6067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/anemoi/training/diagnostics/mlflow/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def refresh_token(self):
@refresh_token.setter
def refresh_token(self, value):
self._refresh_token = value
self.refresh_expires = time.time() + (self.refresh_expire_days * 86400)
self.refresh_expires = time.time() + (self.refresh_expire_days * 86400) # 86400 seconds in a day

def enabled(fn):
"""Decorator to call or ignore a function based on the `enabled` flag."""
Expand Down
4 changes: 2 additions & 2 deletions src/anemoi/training/diagnostics/mlflow/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ def log_hyperparams(self, params: Union[dict[str, Any], Namespace]) -> None:

@rank_zero_only
def finalize(self, status: str = "success") -> None:
# finalize logging and system metrics monitor

# save the last obtained refresh token to disk
self.auth.save()

# finalize logging and system metrics monitor
if run_id_to_system_metrics_monitor:
run_id_to_system_metrics_monitor[self.run_id].finish()
if run_id_to_log_monitor:
Expand Down

0 comments on commit 0fb6067

Please sign in to comment.