Init and config in different files

Hi all,
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.

  1. In Run wandb.config()
  2. In From settings import config
    Run wandb.init() in

I feel like there is an obvious solution, but I cant seem to find it.

Hi @nime6,
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 where you could pass it into wandb.init(config=<your_yaml_converted_to_a_dict>)

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?

Thank you,

Hi @nime6, I just wanted to follow up on this and see if they above would work for you in this case?

Thank you,

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.