我正在尝试使用Sklearn模型部署Seldon部署。该模型是SVC分类器。
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: test-model
namespace: model-dev
spec:
name: anomaly-ml
predictors:
- graph:
implementation: SKLEARN_SERVER
modelUri: s3://test-ml
envSecretRefName: seldon-init-container-secret
name: classifier
name: default
replicas: 1
Seldon分类器失败,出现ModuleNotFoundError:没有名为"sklearn.svm_classes"的模块
model file /mnt/models/model.joblib
Traceback (most recent call last):
File "/usr/local/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 232, in main
user_object = user_class(**parameters)
File "/microservice/SKLearnServer.py", line 23, in __init__
self.load()
File "/microservice/SKLearnServer.py", line 29, in load
self._joblib = joblib.load(model_file)
File "/usr/local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 598, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/usr/local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 526, in _unpickle
obj = unpickler.load()
File "/usr/local/lib/python3.7/pickle.py", line 1085, in load
dispatch[key[0]](self)
File "/usr/local/lib/python3.7/pickle.py", line 1373, in load_global
klass = self.find_class(module, name)
File "/usr/local/lib/python3.7/pickle.py", line 1423, in find_class
__import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn.svm._classes'
Seldon SKLearn服务器是否支持SVC型号?这里出了什么问题?
任何提示都会有所帮助。
Seldon目前支持0.20.3的sklearn。看见https://github.com/SeldonIO/seldon-core/issues/1813