I’m running a grid-search sweep with a custom command of this sort:
project: my_project
program: main.py
name: grid_search
method: grid
metric:
goal: maximize
name: eval_accuracy
parameters:
learning_rate:
values: [1e-5, 5e-5, 1e-4]
batch_size:
values: [4, 8, 16]
command:
- ${env}
- ${interpreter}
- ${program}
- "--run_name"
- "${batch_size}_${learning_rate}"
- ${args}
Note that when passing the --run_name
argument I would like to condition it on the values of the search parameters batch_size
& learning_rate
. I do not want to do this inside my code because the format might change between sweeps and I want my code to be generic.
Is there a way to use the search parameters in other arguments? I tried using ${args_no_hyphens}
before my command so the variables would be defined but it didn’t seem to work.