Skip to content

Commit

Permalink
save configuration to wandb
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Jun 11, 2024
1 parent 580afb3 commit 6afd64b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pvnet/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ def train(config: DictConfig) -> Optional[float]:

assert os.path.isfile(data_config), f"Data config file not found: {data_config}"
shutil.copyfile(data_config, f"{callback.dirpath}/data_config.yaml")

# upload configuration up to wandb
os.makedirs("./configuration", exist_ok=True)
shutil.copyfile(data_config, f"./configuration/data_config.yaml")
OmegaConf.save(config, f"./configuration/config.yaml")
wandb_logger.experiment.save(f"./configuration/data_config.yaml")
wandb_logger.experiment.save(f"./configuration/config.yaml")

break

should_pretrain = False
Expand Down

0 comments on commit 6afd64b

Please sign in to comment.