def default() -> dict: """The default hyperparameters. It will have a version key and a list of candidate models. Each model has its own search space inside. """ ret = { 'version': 1, 'models': { 'BertForTextPredictionBasic': { 'search_space': { 'model.backbone.name': 'google_electra_small', 'optimization.batch_size': 32, 'optimization.num_train_epochs': 4, 'optimization.lr': space.Real(1E-5, 1E-4) } }, }, 'hpo_params': { 'search_strategy': 'random', # Can be 'random', 'bayesopt', 'skopt', # 'hyperband', 'bayesopt_hyperband' 'search_options': None, # Extra kwargs passed to searcher 'scheduler_options': None, # Extra kwargs passed to scheduler 'time_limits': None, # The total time limit 'num_trials': 4, # The number of trials } } return ret
def default() -> dict: """The default hyperparameters. It will have a version key and a list of candidate models. Each model has its own search space inside. """ ret = { 'version': 1, 'models': { 'BertForTextPredictionBasic': { 'search_space': { 'model.backbone.name': 'google_electra_small', 'optimization.batch_size': 32, 'optimization.num_train_epochs': 4, 'optimization.lr': space.Real(1E-5, 1E-4) } }, }, 'hpo_params': { 'scheduler': 'fifo', # Can be 'fifo', 'hyperband' 'search_strategy': 'random', # Can be 'random', 'skopt', or 'bayesopt' 'search_options': None, # The search option 'time_limits': None, # The total time limit 'num_trials': 4, # The number of trials 'reduction_factor': 4, # The reduction factor 'grace_period': 10, # The grace period 'max_t': 50, # The max_t in the hyperband 'time_attr': 'report_idx' # The time attribute used in hyperband searcher. # We report the validation accuracy 10 times each epoch. } } return ret