Is there a way to limit in advance the number of configs a sweep is going to use?
Currently, I need to follow the progress and stop the sweep manually.
Moreover, if there is such a setting, could it also be configured dynamically on-the-fly?
Hi @tomjur, there isn’t really a way to set this explicitly. As @udaylunawat pointed out you could make the sum of the agent counts equal the number of runs you would like but this wouldn’t allow you to dynamically change this as you mentioned.
Probably the closest thing you could do is access the sweep via the API and introduce some logic to shut the sweep if it reaches the number of runs you are looking for. For example:
import wandb
import os
api = wandb.Api()
sweep = api.sweep(path/to/sweep)
if len(sweep.runs) >= max_runs:
command = f'wandb sweep --stop {sweep_id}'
os.system(command)