mirror of
https://github.com/microsoft/FLAML.git
synced 2026-02-09 02:09:16 +08:00
Upgrade Optuna (#1321)
This commit is contained in:
@@ -561,7 +561,15 @@ class OptunaSearch(Searcher):
|
||||
self._space = space
|
||||
|
||||
self._points_to_evaluate = points_to_evaluate or []
|
||||
self._evaluated_rewards = evaluated_rewards
|
||||
# rewards should be a list of floats, not a dict
|
||||
# After Optuna > 3.5.0, there is a check for NaN in the list "any(math.isnan(x) for x in self._values)"
|
||||
# which will raise an error when encountering a dict
|
||||
if evaluated_rewards is not None:
|
||||
self._evaluated_rewards = [
|
||||
list(item.values())[0] if isinstance(item, dict) else item for item in evaluated_rewards
|
||||
]
|
||||
else:
|
||||
self._evaluated_rewards = evaluated_rewards
|
||||
|
||||
self._study_name = "optuna" # Fixed study name for in-memory storage
|
||||
|
||||
|
||||
6
setup.py
6
setup.py
@@ -65,7 +65,7 @@ setuptools.setup(
|
||||
"catboost>=0.26,<1.2; python_version<'3.11'",
|
||||
"catboost>=0.26; python_version>='3.11'",
|
||||
"rgf-python",
|
||||
"optuna==2.8.0",
|
||||
"optuna>=2.8.0,<=3.6.1",
|
||||
"openml",
|
||||
"statsmodels>=0.12.2",
|
||||
"psutil==5.8.0",
|
||||
@@ -94,7 +94,7 @@ setuptools.setup(
|
||||
],
|
||||
"catboost": ["catboost>=0.26"],
|
||||
"blendsearch": [
|
||||
"optuna==2.8.0",
|
||||
"optuna>=2.8.0,<=3.6.1",
|
||||
"packaging",
|
||||
],
|
||||
"ray": [
|
||||
@@ -153,7 +153,7 @@ setuptools.setup(
|
||||
],
|
||||
"synapse": [
|
||||
"joblibspark>=0.5.0",
|
||||
"optuna==2.8.0",
|
||||
"optuna>=2.8.0,<=3.6.1",
|
||||
"pyspark>=3.2.0",
|
||||
],
|
||||
"autozero": ["scikit-learn", "pandas", "packaging"],
|
||||
|
||||
Reference in New Issue
Block a user