question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow `wandb.init` to set `wandb.run.dir`.

See original GitHub issue

Problem or Use Case I am working with wandb and hydra. Like wandb, hydra creates a new output directory unique to each run. I would like to unite my wandb output directory and hydra output directory – for one, I would like to be able to save my hydra config.yaml to wandb.ai because it includes all of the parameters (including defaults) and not just the ones that were set from the command line.

Suggested Solution I think the best option would be to have separate dir and base_dir arguments for wandb.init.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ethanabrookscommented, Dec 17, 2020

I see. The symlink solution should work. Thank you.

1reaction
vanpeltcommented, Dec 17, 2020

Hey @ethanabrooks calling wandb.save on a file outside of the runs directory symlinks it into the run directory. Those paths are the sym-linked paths. If you look at the contents of config.yaml it should be hydra config.

I’m thinking there may be another problem however. We keep our own config.yaml file that may confuse our logic if its format changes. The most full proof way to save the config is simply to symlink or copy the file into the run directory as a different name.

os.symlink(os.path.abspath(".hydra/config.yaml"), os.path.join(wandb.run.dir, "hydra-config.yaml"))
wandb.save("hydra-config.yaml")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow `wandb.init` to set `wandb.run.dir`. · Issue #1620
Problem or Use Case I am working with wandb and hydra. Like wandb, hydra creates a new output directory unique to each run....
Read more >
Launch Experiments with wandb.init - Documentation
Call wandb.init() once at the beginning of your script to initialize a new job. This creates a new run in W&B and launches...
Read more >
wandb.init - Documentation - Weights & Biases
wandb.init() spawns a new background process to log data to a run, and it also syncs data to wandb.ai by default, so you ......
Read more >
wandb.Run - Documentation - Weights & Biases
Returns the name of the group associated with the run. Setting a group helps the W&B UI organize runs in a sensible way....
Read more >
Save & Restore Files - Documentation - Weights & Biases
When wandb.save is called it will list all files that exist at the provided path and create symlinks for them into the run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found