From f5acaad0ab7ceb41549c6d39a37e7d4a85fff10a Mon Sep 17 00:00:00 2001 From: clemsgrs Date: Thu, 24 Oct 2024 10:57:53 +0200 Subject: [PATCH] improved wandb logging logic --- dinov2/utils/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: