From ae937dd3056e61283f39c6385676c4b077de2ceb Mon Sep 17 00:00:00 2001 From: Peter Dudfield <34686298+peterdudfield@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:12:53 +0100 Subject: [PATCH] save configuration to wandb (#217) * save configuration to wandb * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * save to top level wandb folder * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- pvnet/training.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pvnet/training.py b/pvnet/training.py index cc5f3c43..cafcdac4 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 + OmegaConf.save(config, "./experiment_config.yaml") + wandb_logger.experiment.save( + f"{callback.dirpath}/data_config.yaml", callback.dirpath + ) + wandb_logger.experiment.save("./experiment_config.yaml") + break should_pretrain = False