Skip to content

Instantly share code, notes, and snippets.

@cj2001
Created November 2, 2021 20:36
Show Gist options
  • Save cj2001/7666bc80bdfdece464cc23ff416b37ec to your computer and use it in GitHub Desktop.
Save cj2001/7666bc80bdfdece464cc23ff416b37ec to your computer and use it in GitHub Desktop.
CORA Optuna objective
def optuna_objective(trial):
params = {
'embeddingDimension': trial.suggest_int('embeddingDimension', 32, 512, log=True),
'thirdWeight': trial.suggest_float('thirdWeight', 0.0, 1.0),
'fourthWeight': trial.suggest_float('fourthWeight', 0.0, 1.0),
'normalizationStrength': trial.suggest_float('normalizationStrength', -1.0, 1.0)
}
return objective(params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment