Skip to content

How to set hyperparameters search range and run the search? #45

@bighuang624

Description

@bighuang624

Thanks for your powerful project and it's really helpful. I 'd like to try it for my current research if everything goes well.

My problem is, how to set hyperparameters search range and run the search? I 've read the chapters 'CPU hyperparameter search' and 'Running grid search on a cluster' in your document, however, I guess it is not very clear as there is only a few lines of code in 'CPU hyperparameter search' chapter without explanation (and main_local appears in the code without declaration).

Here is my trial to change LightningTemplateModel and single_cpu_template.py to be able to perform a hyperparameter search:

  1. set tunable=True for some params in def add_model_specific_args(parent_parser, root_dir) in LightningTemplateModel, e.g., parser.opt_list('--learning_rate', default=0.001*8, type=float, options=[0.0001, 0.0005, 0.001, 0.005], tunable=True)
  2. annotate main(hyperparams) and add hyperparams.optimize_parallel_cpu( main, nb_trials=20, nb_workers=1 )

However, it doesn't seem to work. So how can I set hyperparameters search range and run the search?

Sorry if my presentation is unclear (as I 'm not a native speaker). Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions