From 6afd64b15f2832774a077638135bb622279e7356 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Tue, 11 Jun 2024 10:42:27 +0100 Subject: [PATCH] save configuration to wandb --- pvnet/training.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pvnet/training.py b/pvnet/training.py index cc5f3c43..a95f6acd 100644 --- a/pvnet/training.py +++ b/pvnet/training.py @@ -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