Wandb tracker run and project specifier

When not using the HF accelerate library, I can control the project and run name in wandb in the following way:

wandb.init(project='my_research')
wandb.run.name = 'dogs_are_awesome_' + str(experiment_number) 

Is there a way to do this using the experiment tracker objects in Accelerate?

Not sure about Accelerate, but if there is a wandb process running on your machine you can probably still just call wandb.run.name, without having to use the Accelerate experiment tracker object

Assuming that wandb is the only tracker, you can do:

accelerate = Accelerator(log_with="wandb")
accelerate.init_trackers("my_research")

accelerate.trackers[0].run.name = f'dogs_are_awesome_{experiment_number}'

@morgan do we think that it should be easier to access .run in the wandb tracker specifically in Accelerate? (do people modify/use it often?)

Yeah I think so, i do see it used for things like the above that it would be handy to have easy access to it

1 Like

@morgan @muellerzr to give you an idea of my usecase, being able to change the run name helps me when running multiple experiments. Basically, I read in several config json files and I associate those files with the run name. That way when I launch wandb I can track the config file and respective experiment.

Thanks for the response!