Skip to content
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

[CLI]: Local files named config.yaml and saved by wandb are overwritten #7654

Open
collinmccarthy opened this issue May 15, 2024 · 3 comments

Comments

@collinmccarthy
Copy link

Describe the bug

I'm adding Wandb to some detectron2 models for some baselines, and detectron2 names their config file config.yaml. I save this file with wandb.save(config_yaml_path) and it uploads successfully. But then the local version gets overwritten by the config file that gets generated by wandb, also named config.yaml but in the run directory. I'm not passing in a config, so it's just a yaml file with wandb_version: 1 and the _wandb dictionary.

Of course, this happens because when I save the file it creates a symlink, and then wandb creates it's own config.yaml file which overwrites the version pointed to by the symlink. I'm guessing this description is enough for you all to track down the issue.

Additional Files

No response

Environment

WandB version: 0.17.0

OS: Ubuntu 20.04 LTS

Python version: 3.8 (max supported by detectron2)

Versions of relevant libraries:
detectron2: 0.6 (latest)

Additional Context

My workaround is to rename the file to config.yml instead of config.yaml prior to saving with wandb, and then everything works fine.

@luisbergua
Copy link
Contributor

Hey @collinmccarthy! Would you mind sharing if setting the env variable WANDB_CONFIG_DIR (docs here) to a different directory solves the problem?

@luisbergua
Copy link
Contributor

Hey @collinmccarthy, just checking if you had the time to test setting the env variable as I suggested and if it worked

@collinmccarthy
Copy link
Author

Hey @luisbergua, sorry for the delay. Setting WANDB_CONFIG_DIR to a different directory did not work. However if I noticed that when my init args use resume=False instead of resume='auto' the config.yaml file is no longer a symlink and everything works fine. So this issue only happens when resuming and saving a file named config.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants