loggingwandb

Changing the WandB logging directory


I'm doing a lot of experiments with WandB, and it is on a shared server where logs and whatnot need to be placed in specific directories. WandB likes to store a lot of information (as it should, defined by me) so the folder grows rapidly, up to 5GB in a single day.

Is there any way to specify to WandB where to put this folder with logs?.. I searched their docs, but didn't find anything that mentions a parameter in init or otherwise to specify the path.

Alternatively, I thought of moving the physical location of the WandB folder from my script path to the proper place, and creating a symlink to my script location. Do you think that would work?


Solution

  • Posting this answer because Google didn't properly index the WandB docs, and it isn't mentioned there sufficiently, so this becomes easier to find for those in the future who may have missed it.


    The default WandB logging directory is set to ./wandb which is the default parameter for the dir config parameter of wandb.init which means you can set dir="your path" during wandb.init;

    Additionally, it is unwise to attempt to create a global wandb directory for multiple unrelated runs and symlink all of the runs WandB logs to the one directory due to how WandB handles artifacts.