diff --git a/dinov2/utils/utils.py b/dinov2/utils/utils.py index f04b8cc7c..7099b14ca 100644 --- a/dinov2/utils/utils.py +++ b/dinov2/utils/utils.py @@ -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: