From 580365e73c30883a8f719b731d6332261940df51 Mon Sep 17 00:00:00 2001 From: tlpss Date: Mon, 6 Nov 2023 14:36:32 +0100 Subject: [PATCH] fix issue with naming wandb runs --- keypoint_detection/tasks/train.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/keypoint_detection/tasks/train.py b/keypoint_detection/tasks/train.py index be1e0c1..0618dd3 100644 --- a/keypoint_detection/tasks/train.py +++ b/keypoint_detection/tasks/train.py @@ -89,9 +89,10 @@ def train(hparams: dict) -> Tuple[KeypointDetector, pl.Trainer]: data_module = KeypointsDataModule(**hparams) wandb_logger = WandbLogger( - name=hparams["wandb_name"], - project=hparams["wandb_project"], - entity=hparams["wandb_entity"], + # these are already set in the wandb init (to start from a sweep config) + # name=hparams["wandb_name"], + # project=hparams["wandb_project"], + # entity=hparams["wandb_entity"], save_dir=get_wandb_log_dir_path(), log_model=True, # only log checkpoints at the end of training, i.e. only log the best checkpoint # not suitable for expensive training runs where you might want to restart from checkpoint @@ -141,6 +142,7 @@ def train_cli(): # these can then be found in the 'config' # (so wandb params > argparse) wandb.init( + name=hparams["wandb_name"], project=hparams["wandb_project"], entity=hparams["wandb_entity"], config=hparams,