Created
July 22, 2020 06:00
-
-
Save himkt/08fedc4bd532a8ccb440fd286084ce0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from optuna.integration import AllenNLPExecutor | |
import optuna | |
def objective(trial: optuna.Trial) -> float: | |
trial.suggest_float("embedding_dropout", 0.0, 0.5) | |
executor = AllenNLPExecutor(trial, "./config.jsonnet", "result", include_package="allennlp_models") | |
return executor.run() | |
if __name__ == "__main__": | |
study = optuna.create_study() | |
study.optimize(objective, n_trials=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment