Terrific - thank you!
In re-reading you issue I think I initially misunderstood what you’re asking for.
If you want to run two trials and select a single flag value at random, Guild would consider this a random search. You can do this by running:
guild run train x=[1,2,3,4] -o random
You can always specify an optimizer using -o
or --optimizer
to override Guild’s automation detection behavior.
When the random
optimizer sees a list of values for a flag, it treats that list as a category dimension and selects randomly from the list of values.
What Guild currently does not support — and this is what I had originally thought you were asking about — is to integrate random selection with a true grid search. Something like this:
guild run x=[1:4] y=[5,6] z=[7,8] -o +
Does NOT work as of 0.7.0.rc11
Guild sees the value [1:4]
for x
in this case and treats it as a string. Your script gets the literal value rather than a random section from that range. I have a branch grid-support-flag-functions
where this is fixed but it’s not released yet.
I think also the following command should be a grid search that generates four trials and where x
is randomly selected for each of the four trials:
guild run x=uniform[1,2,3,4] y=[5,6] z=[7,8]
Does NOT work as of 0.7.0.rc11
This is a sensible enhancement we could make in the grid-support-flag-functions
work.