-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Still not able to use non-sklearn estimators without wrapping them in a pipeline #734
Comments
Easier way to reproduce: import openml
from sklearn.linear_model import LogisticRegression
# there needs to be a version specified but this works lol.
__version__ = 0.1
class MyLR(LogisticRegression):
pass
clf = MyLR()
# get task
task = openml.tasks.get_task(3)
# run model on task
run = openml.runs.run_model_on_task(clf, task)
# publish run on openml
run.publish()
So The problem is that the flow that is created from that model is not an sklearn extension flow, because that's created by
There are two obvious fixes: b) include the sklearn version in the external version I feel we should be doing both possibly? |
what would you test for? The interface?
that would definitively be helpful
I hope that this won't be necessary, but we should keep it in mind in case this problem persists. |
This issue still persists with older flows: import openml
openml.flows.get_flow(7660, reinstantiate=True) I would really like to run flow 7777 because it's used in the definition of CC-18, but I can't because it contains the ConditionalImputer, which can't be reinstantiated with current openml (I tried to use older openml and failed as well). |
Two questions:
|
We can decide that we basically abandon all third-party flows that were created before #742, or we need to change how an extension detects if it can handle a flow. Hacky solution: add |
cc @janvanrijn |
fixed in #830 |
Hi there, I raised this in issue #724. I have been trying to run experiments with a fairly new sklearn-extra classifier (/~https://github.com/Alex7Li/scikit-learn-extra/tree/master/sklearn_extra). The classifier runs fine on a local dataset. However, when I am trying to run it on an openml task, I am getting an error.
Here is a minimal example:
AttributeError Traceback (most recent call last)
in
4 task = openml.tasks.get_task(3)
5 # run model on task
----> 6 run = openml.runs.run_model_on_task(clf, task)
7 # publish run on openml
8 run.publish()
/miniconda3/lib/python3.7/site-packages/openml/runs/functions.py in run_model_on_task(model, task, avoid_duplicate_runs, flow_tags, seed, add_local_measures, upload_flow, return_flow)
104 seed=seed,
105 add_local_measures=add_local_measures,
--> 106 upload_flow=upload_flow,
107 )
108 if return_flow:
/miniconda3/lib/python3.7/site-packages/openml/runs/functions.py in run_flow_on_task(flow, task, avoid_duplicate_runs, flow_tags, seed, add_local_measures, upload_flow)
172 task, flow = flow, task
173
--> 174 flow.model = flow.extension.seed_model(flow.model, seed=seed)
175
176 # We only need to sync with the server right now if we want to upload the flow,
AttributeError: 'NoneType' object has no attribute 'seed_model'
You mentioned that this should be fixed via #722, but I am still encountering the same error.
@amueller
The text was updated successfully, but these errors were encountered: