Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Pass estimators via object store IDs #196

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Mar 12, 2021

Currently estimator objects are passed via the config parameter (as is the data). However, in some cases this can lead to unexpected errors when creating the search space with Hyperopt.

By passing the estimators via the object store we circumvent this problem.

After the next release we might want to use tune.with_parameters() to avoid passing anything other than the search space via the config parameter, see ray-project/ray#14532

Closes #186

@@ -43,7 +42,8 @@ def _setup(self, config):
stopping if it is set to true.

"""
self.estimator_list = clone(config.pop("estimator_list"))
estimator_ids = list(config.pop("estimator_ids"))
self.estimator_list = ray.get(estimator_ids)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implicitly clones the estimators

@krfricke krfricke merged commit d07dfad into ray-project:master Mar 12, 2021
@krfricke krfricke deleted the estimator-object-store branch March 12, 2021 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] TuneSearchCV with hyperopt raise an error with sklearn.RandomForestClassifier
2 participants