How do I upload code to WandB every time I run it

To back up the code, I want to upload my training code to Wandb every time I run it. Is this possible?

No, wandb does not have an option to store code. Why do you want to save the code?

  1. Are you changing the hparams in your code in every run? - Then you could try using wandb.sweep() instead, as it visualizes your model’s performance for different hparams

  2. Are you using different architectures while training? - Wandb artifacts logs datasets and model/training data. There are functions that track all your parameters (wandb. watch() iirc). This leads to an ONNX format of your model being saved. This ONNX model can be visualized, and you could use that to see what model was trained. Or you could even save a string in your config file with details of the model you’re training

Actually you can upload the code by passing the save_code argument to wandb.init()

Hey there, have you tried that out?

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

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