-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save configuration to wandb #217
Conversation
for more information, see https://pre-commit.ci
pvnet/training.py
Outdated
os.makedirs("./configuration", exist_ok=True) | ||
shutil.copyfile(data_config, "./configuration/data_config.yaml") | ||
OmegaConf.save(config, "./configuration/config.yaml") | ||
wandb_logger.experiment.save("./configuration/data_config.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we not just upload f"{callback.dirpath}/model_config.yaml"
and f"{config.datamodule.batch_dir}/data_configuration.yaml"
since these already exist rather than saving them to ./configuration
first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file structure in wandb matches the file strcutre of the files uploaded, and I wanted it neat, rather than some mnt/storage4tb_b/..../
for the data configuration. But perhaps there is a neater way to do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running this:
logger.experiment.save("/home/jamesfulton/repos/PVNet_summation/checkpoints/znoi18se/model_config.yaml")
and the file appears here without any subdirectories. So that suggests logger.experiment.save(f"{callback.dirpath}/model_config.yaml")
should work and save without subdirs?
But maybe I'm missing something, and if that doesn't work can we just delete ./configuration
after uploading to wandb to keep things tidy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, yea, ok I could try that.
How do you feel about override the current config.yaml
in wandb with a new one? My feeling is that we should save both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh I'd save both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like I have to use wandb_logger.experiment.save(f"{callback.dirpath}/data_config.yaml", callback.dirpath)
to make sure its not in a sub folder. Im on a slightly high wandb version that you @dfulu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…nfig # Conflicts: # pvnet/training.py
for more information, see https://pre-commit.ci
Pull Request
Description
_target_
dicts, and tricky to find out where the error was. Easier to save the file directly#168
How Has This Been Tested?
Ran it locally
Checklist: