Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created March 4, 2022 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paulescu/876e40b8216b5a0ed2b174f5949cdd10 to your computer and use it in GitHub Desktop.
Save Paulescu/876e40b8216b5a0ed2b174f5949cdd10 to your computer and use it in GitHub Desktop.
from src.optimize_hyperparameters import objective
# we define a lambda function because study.optimize()
# expects the objective function to have only 1 input
# (trial), while our objective function hast 2 extra
# inputs I defined to add flexibility to the script
func = lambda trial: objective(trial,
force_linear_model=False,
n_episodes_to_train=200)
study.optimize(func, n_trials=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment