Hi,
I am tuning hyper-params with wandb.sweep(). As I know the params are defined in sweep_id and insert into wandb.sweep() like this:
sweep_configuration = {
'method': 'bayes',
'name': 'I dont believe that I can not just give you a name!',
'metric': {'goal': 'minimize', 'name': 'Valid/final_ber'},
'parameters':
{
'batch_size': {'distribution': 'int_uniform','min': 10,'max': 12},
'lr': {'distribution': 'int_uniform','max': -3,'min': -4}
}
}
sweep_id = wandb.sweep(sweep=sweep_configuration, project=args.project, entity=args.entity)
Now I what I want to do is to extract the params batch_size and lr from each sweep into the name of wand.init()
, because I need these information in name of each run to identify them.
But in wandb frame, I cannot get access to the params in wandb.config
before wandb.init()
. As a result I cannot define argument name in wandb.init()
with params which are given during each sweep.
......
wandb.init(name=f'{wandb.config.lr}_{wandb.config.batch_size}')
......
Run wnb56ush errored: Error('You must call wandb.init() before wandb.config.lr')
wandb: ERROR Run wnb56ush errored: Error('You must call wandb.init() before wandb.config.lr')
Is there a way to get the params given by wandb.sweep()
before wandb.init()?
Thanks at advance