Skip to content

Commit

Permalink
improved wandb logging logic
Browse files Browse the repository at this point in the history
  • Loading branch information
clemsgrs committed Oct 24, 2024
1 parent 180659f commit f5acaad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dinov2/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def initialize_wandb(
cfg: DictConfig,
key: Optional[str] = "",
):
command = f"wandb login {key}"
subprocess.call(command, shell=True)
if not key:
key = input("Enter your W&B API key: ")
wandb.login(key=key)
if cfg.wandb.tags is None:
tags = []
else:
Expand Down

0 comments on commit f5acaad

Please sign in to comment.