Skip to content

Instantly share code, notes, and snippets.

@pkgandhi
Last active August 13, 2020 11:59
Show Gist options
  • Save pkgandhi/81fafc916d5fed3c26d562966e878eb5 to your computer and use it in GitHub Desktop.
Save pkgandhi/81fafc916d5fed3c26d562966e878eb5 to your computer and use it in GitHub Desktop.
Creating a study and storing
# Import the package:
import joblib
# Create a study name:
study_name = 'experiment-C'
# Store in DB:
study = optuna.create_study(study_name=study_name, storage='sqlite:///tmp/experiments.db', load_if_exists=True)
# Store and load using joblib:
#joblib.dump(study, 'experiments.pkl')
#study = joblib.load('experiments.pkl')
# Optimize:
study.optimize(objective, n_trials=3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment