Skip to content

Commit

Permalink
Relax hyperopt version bounds
Browse files Browse the repository at this point in the history
Change the random generator passed in to hyperopt

Signed-off-by: Avi Shinnar <[email protected]>

Signed-off-by: Avi Shinnar <[email protected]>
  • Loading branch information
shinnar committed Aug 23, 2024
1 parent 4b7e7ce commit f14ca84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lale/lib/lale/hyperopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def f(params):
algo=algo.suggest,
max_evals=self.evals_with_defaults,
trials=self._default_trials,
rstate=np.random.RandomState(SEED),
rstate=np.random.default_rng(SEED),
show_progressbar=self.show_progressbar,
)
except SystemExit:
Expand All @@ -266,7 +266,7 @@ def f(params):
algo=algo.suggest,
max_evals=self.max_evals - self.evals_with_defaults,
trials=self._trials,
rstate=np.random.RandomState(SEED),
rstate=np.random.default_rng(SEED),
show_progressbar=self.show_progressbar,
)
except SystemExit:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"numpy",
"black>=22.1.0",
"graphviz",
"hyperopt>=0.2,<=0.2.5",
"hyperopt>=0.2,<=0.2.7",
"jsonschema<=4.20.0",
"jsonsubschema>=0.0.6",
"scikit-learn>=1.0.0,<1.5.0",
Expand Down

0 comments on commit f14ca84

Please sign in to comment.