Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name argument to OptunaSolverFactory #13

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion kurobako/solver/optuna.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ class OptunaSolverFactory(solver.SolverFactory):
def __init__(
self,
create_study: Callable[[int], optuna.Study],
name: str = "Optuna",
use_discrete_uniform: bool = False,
warm_starting_trials: int = 0,
):
self._create_study = create_study
self._name = name
self._use_discrete_uniform = use_discrete_uniform
self._warm_starting_trials = warm_starting_trials

def specification(self) -> solver.SolverSpec:
return solver.SolverSpec(
name="Optuna",
name=self._name,
attrs={
"version": "optuna={}, kurobako-py={}".format(
get_distribution("optuna").version, get_distribution("kurobako").version
Expand Down