I want to seperate the wandb.config from wandb.init in my training script. Howerever I cant seem to get around a circular import when trying to do this. I had a workaround where I use .init(mode=“offline”), so I can use wandb.config() afterwards and then call init() again in the training script. However this does not seem to work with sweeps.
- In settings.py: Run wandb.config()
- In training.py: From settings import config
Run wandb.init() in training.py
I feel like there is an obvious solution, but I cant seem to find it.
I may need to know a little bit more about the use case here. My initial thought is to save config as a .yaml and then read that into your
training.py where you could pass it into
This also might be a use case for using a file based config.
If that doesn’t seem like what you are looking for could you elaborate more on why you are trying to set
wandb.config()outside of the training script?
Hi @nime6, I just wanted to follow up on this and see if they above would work for you in this case?