Skip to content

Commit

Permalink
save configuration to wandb (#217)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
peterdudfield and pre-commit-ci[bot] authored Jun 11, 2024
1 parent 580afb3 commit ae937dd
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
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
Expand Down

0 comments on commit ae937dd

Please sign in to comment.