Skip to content

Commit

Permalink
fix setting seed when nr sobol trials is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbroscheit committed Mar 11, 2020
1 parent 4c5a298 commit abd0056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kge/job/ax_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def init_search(self):
objective_name="metric_value",
minimize=False,
parameter_constraints=self.config.get("ax_search.parameter_constraints"),
choose_generation_strategy_kwargs={'random_seed': 0},
)
self.config.log(
"ax search initialized with {}".format(self.ax_client.generation_strategy)
Expand All @@ -79,7 +80,6 @@ def init_search(self):
# Fix seed for sobol. We do this by generating the model right away (instead
# of automatically once first trial is generated).
if self.ax_client.generation_strategy._curr.model_kwargs is not None:
self.ax_client.generation_strategy._curr.model_kwargs['seed'] = 0
kwargs = {}
else:
kwargs = {'seed':0}
Expand Down

0 comments on commit abd0056

Please sign in to comment.