Skip to content

Commit

Permalink
flake8 style
Browse files Browse the repository at this point in the history
  • Loading branch information
Arseniy Belkov committed Feb 7, 2024
1 parent 04ec7d5 commit 0b5892d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions thunder/torch/loggers/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ class WandbLogger(_WandbLogger):
def __init__(self, name=None, save_dir='.', version=None,
offline=False, dir=None, id=None, anonymous=None, project=None,
log_model=False, experiment=None,
remove_dead_duplicates: bool = False, allow_rerun: bool = False, prefix='', checkpoint_name=None, **kwargs):

remove_dead_duplicates: bool = False, allow_rerun: bool = False, prefix='',
checkpoint_name=None, **kwargs):

if allow_rerun:
if project is None:
raise ValueError("If you want WandB to load old logs, you should specify 'project'")
versions = list(Path(save_dir).glob(f"{project}/*"))
version = max(versions, key=lambda t: os.stat(t).st_mtime).name

super().__init__(name, save_dir, version, offline, dir, id, anonymous, project,
log_model, experiment, prefix, checkpoint_name, **kwargs)

Expand Down

0 comments on commit 0b5892d

Please sign in to comment.