Hi, I’m a longtime WandB user but new to sweeps.
We want to do some model architecture searches and the models are defined in .gin
files. Here’s a snippet:
RATIOS = [4, 4, 4, 2, 2]
DILATIONS = [1, 3, 9]
KERNEL_SIZE = 3
models.OurAwesomeModel:
ratios = %RATIOS
dilations = %DILATIONS
pre_conv = @encoder/pre_conv/nn.Conv1d
post_conv = @encoder/post_conv/nn.Conv1d
I want to vary parameters like the all-caps ones above – including the ones that are lists!
How do we do that? I’m reading the Documentation on Sweeps and I can’t find anything that address this.
Given that gin
files are Python-like, is there some kind of wandb.sweeps.gin()
that I can put in there ?
The sweeps docs I’m seeing make it seem like the only control options are command line args. By the time I’m parsing command line args, those architecture bins in the .gin file have already been instantiated.
Now, obviously I could write a little intermediary script that takes the parameters as command line args and outputs a header to a (new) .gin script and then calls my main code from there – I’m not above doing that! — but is there perhaps some other gin-friendly/gin-powered way that’s already been devised?
One more question:( I checked the Docs and the FAQ but I still couldn’t find the answer to this)
How do we get the sweeps controller to vary the elements in a list? I don’t have to make a separate variable for every list element, do I?
Thanks.