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

SKLearn version support too low #1813

Closed
Guoyoyo opened this issue May 8, 2020 · 3 comments · Fixed by #2241
Closed

SKLearn version support too low #1813

Guoyoyo opened this issue May 8, 2020 · 3 comments · Fixed by #2241
Assignees
Milestone

Comments

@Guoyoyo
Copy link

Guoyoyo commented May 8, 2020

The following is my sklearn_server.yaml

apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
  name: sklearn
  namespace: seldon-system
spec:
  #annotations:
  #  seldon.io/executor: "true"
  name: iris-s3
  predictors:
    - graph:
        children: []
        implementation: SKLEARN_SERVER
        modelUri: s3://mymodel
        envSecretRefName: seldon-init-container-secret
        name: classifier
      name: default
      replicas: 1

I upload a sklearn model into S3 storage. The Seldon classifier fails with ModuleNotFoundError: No module named 'sklearn.svm._classes'

Traceback (most recent call last):
  File "/opt/conda/bin/seldon-core-microservice", line 11, in <module>
    load_entry_point('seldon-core', 'console_scripts', 'seldon-core-microservice')()
  File "/microservice/python/seldon_core/microservice.py", line 288, in main
    user_object = user_class(**parameters)
  File "/microservice/SKLearnServer.py", line 23, in __init__
    self.load()
  File "/microservice/SKLearnServer.py", line 31, in load
    self._joblib = joblib.load(model_file)
  File "/opt/conda/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 605, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "/opt/conda/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 529, in _unpickle
    obj = unpickler.load()
  File "/opt/conda/lib/python3.7/pickle.py", line 1088, in load
    dispatch[key[0]](self)
  File "/opt/conda/lib/python3.7/pickle.py", line 1376, in load_global
    klass = self.find_class(module, name)
  File "/opt/conda/lib/python3.7/pickle.py", line 1426, in find_class
    __import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn.svm._classes'

I ask in the slack community, thanks Clive Cox tell me that seldon seems support sklearn v0.20.3 for now.

@axsaucedo
Copy link
Contributor

@Guoyoyo currently it's quite easy to extend your own server with any desirable sklearn version. We suggest you trying doing so, and you can do so by following the custom server tutorial in the docs https://docs.seldon.io/projects/seldon-core/en/latest/servers/sklearn.html

We have explored maintaining newer versions, however it does add quite a lot of complexity for us to manage multiple versions of each library, and keep them up to date on every single release. Given it's so simple to define your own dependencies, this is the way that we suggest this being done.

@ukclivecox
Copy link
Contributor

However, we should update to latest when possible.

@ukclivecox ukclivecox added this to the 1.3 milestone Jul 18, 2020
@Guoyoyo
Copy link
Author

Guoyoyo commented Aug 4, 2020

OK, I will try it again later, thanks for reply. Do I need to close this issue ?

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

Successfully merging a pull request may close this issue.

3 participants