Skip to content

Commit

Permalink
[fix] Always set the run name when initializing a run in lightning (#…
Browse files Browse the repository at this point in the history
…3102)

Always set the run name when initializing a run in lightning

Before, the run name would only be set when a run hash has been specified by the user, which
is only the case in unusual circumstances, e.g. when a previous model training is resumed
at a later time. In effect, run names were never set in my case.
  • Loading branch information
martenlienen authored Mar 13, 2024
1 parent 523acee commit a19c929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aim/sdk/adapters/pytorch_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ def experiment(self) -> Run:
capture_terminal_logs=self._capture_terminal_logs,
force_resume=True
)
if self._run_name is not None:
self._run.name = self._run_name
else:
self._run = Run(
repo=self._repo_path,
Expand All @@ -105,6 +103,8 @@ def experiment(self) -> Run:
capture_terminal_logs=self._capture_terminal_logs,
)
self._run_hash = self._run.hash
if self._run_name is not None:
self._run.name = self._run_name
return self._run

@rank_zero_only
Expand Down

0 comments on commit a19c929

Please sign in to comment.