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

Estimators inside parameter grid don't work #244

Open
Yatoom opened this issue May 3, 2017 · 2 comments
Open

Estimators inside parameter grid don't work #244

Yatoom opened this issue May 3, 2017 · 2 comments

Comments

@Yatoom
Copy link

Yatoom commented May 3, 2017

When I use GridSearchCV or RandomizedSearchCV with a param grid that includes a list of estimators, this will raise a TypeError: TypeError(repr(o) + " is not JSON serializable"). This happens inside the _extract_information_from_model() method.

Here is the code to reproduce this error:

import openml
from sklearn.ensemble import AdaBoostClassifier
from sklearn.model_selection import GridSearchCV
from sklearn.tree import DecisionTreeClassifier, ExtraTreeClassifier

task = openml.tasks.get_task(49)

param_grid = {
    "base_estimator": [DecisionTreeClassifier(), ExtraTreeClassifier()]
}

clf = GridSearchCV(AdaBoostClassifier(), param_grid=param_grid)
run = openml.runs.run_task(task, clf)
run.publish()
@mfeurer
Copy link
Collaborator

mfeurer commented May 4, 2017

Thanks for reporting. This is an inteded limitation. We did not yet implement this feature as we want to spend our time getting the basic functionality of package running there first.

@janvanrijn
Copy link
Member

Created a unit test for this, as it might be useful to check this behaviour holds and does not flood the database with invalid runs. PR will follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants