summaryrefslogtreecommitdiff
path: root/training
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-27 18:18:44 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-06-27 18:18:44 +0200
commit9dba17704492afed6d9c134245f9528eb82c9918 (patch)
tree8e2eac869436200513e22014b3bf52629805ff21 /training
parent889731f491266a0626861f07fe2a0de1f6caa468 (diff)
Fix not being able to upload config
Diffstat (limited to 'training')
-rw-r--r--training/callbacks/wandb_callbacks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/training/callbacks/wandb_callbacks.py b/training/callbacks/wandb_callbacks.py
index 978098b..aa72480 100644
--- a/training/callbacks/wandb_callbacks.py
+++ b/training/callbacks/wandb_callbacks.py
@@ -42,14 +42,14 @@ class UploadConfigAsArtifact(Callback):
"""Upload all *.py files to W&B as an artifact, at the beginning of the run."""
def __init__(self) -> None:
- self.config_dir = Path(".")
+ self.config_dir = Path(".hydra/")
@rank_zero_only
def on_train_start(self, trainer: Trainer, pl_module: LightningModule) -> None:
"""Uploads project code as an artifact."""
logger = get_wandb_logger(trainer)
experiment = logger.experiment
- artifact = wandb.Artifact("config", type="config")
+ artifact = wandb.Artifact("experiment-config", type="config")
for filepath in self.config_dir.rglob("*.yaml"):
artifact.add_file(str(filepath))
@@ -70,7 +70,7 @@ class UploadCheckpointsAsArtifact(Callback):
"""Uploads model checkpoint to W&B."""
logger = get_wandb_logger(trainer)
experiment = logger.experiment
- ckpts = wandb.Artifact("checkpoints", type="checkpoints")
+ ckpts = wandb.Artifact("experiment-ckpts", type="checkpoints")
if self.upload_best_only:
ckpts.add_file(trainer.checkpoint_callback.best_model_path)