Initialize multiple runs and update them simultaneously

Thank you for the never ending support of the API!
I have a scenario where I have multiple forward passes in each step. I imagine initialising multiple wandb runs and update them independently. Is there a feature that might support this use case?
This is roughly what I would like to have:

wandb_run_1 = wandb.init(...)
wandb_run_2 = wandb.init(...)
runs = [wandb_run_1, wandb_run_2]
for _ in range(step_nums):
    for pass_idx in range(num_forward_pass):
        runs[pass_idx].log(...)

I’ll appreciate any kind of hints!:slight_smile:

hey @ksmdnl - I’ll paste my response from the github thread here as well for visibility:

currently we don’t support logging more than 1 run in the same process. this would have to be done sequentially. alternatively, perhaps you can utilize Python’s multiprocessing library to spin up separate processes. Each process can handle its own W&B run, allowing you to independently log different forward passes or experiments. Please let me know if you have further questions or would like to discuss further!

1 Like