Changing files after starting a sweep


Say I have some Python script that runs a lengthy hyperparameter sweep. Under the hood, uses many other Python files to train and evaluate the models.
Now, say that after starting the sweep, I want to edit one of the Python files (that are used by the sweep), but I don’t want to stop the running sweep, and I don’t care that it uses the “older” version of the files. This can happen, for example, if I want to add some support to a new use case that requires changing the files, but I don’t want to lose the current running sweep. So, I was wondering if there’s any harm in editing the files while a sweep is running? Can this cause any problems? And what will happen in this case? What I want to happen is that the sweep that has started will run till completion with the older version files (those it started with) and that the editing will only affect newer sweeps that start after the editing (this, for example, what would happen if you run a python script and just edit the script after you started running it – the editing won’t affect the old run), however, I don’t know how W&B run the sweep under the hood?


Hello @yurman !

In terms of editing one of the files that the script will use, this will not break the sweep and the sweep will continue to run with the different file (as long as it is the same name). Sweeps will create runs with different hyperparameters so changing the contents of the files would act the same as changing the files between or during a run (depending on when you change the content of the file).


Thanks for the reply, but I’m not sure I understand.
Say that at time t1 I start a sweep that is supposed to last until t2 and uses some file
At some time t3 < t2 but t3 > t1, I change the file while the sweep is still running.
What will happen exactly? will that break the sweep? will the sweep continue and will use the older version of

There are two things could change:

  1. The which the sweep uses
  2. The files that references (such as other scripts, let’s say a with helper functions is imported in

If you change during a sweep, the sweep will continue to use the original version of It will not use the updated version of

However, if you change during the sweep, the sweep will use the newer version of

Hope that makes sense!

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