[QST] Can cuML models be run with sklearn
What is your question? I have a Epsilon-Support Vector Regression (SVR) model that I'm using sklearn to fit. I'm currently deploying this in an environment that is only confirmed compatible with sklearn.
Is it possible to fit a model using cuML, but get predictions by loading it in a sklearn environment. A question was asked #4869, but I'm not sure if the CPU/GPU interoperability features have been implemented.
Thanks
Thanks for the issue @CanOfSocks! This is very good timing to ask, we are actively working right now (well @viclafargue ) to enable this to be possible for SVMs in the near future: https://github.com/rapidsai/cuml/pull/6089
Updating this issue, created #6102 to add an explicit and supported API to export (supported) cuML models to Scikit-learn. This issue will be solved when both of these PRs are merged.
cuml now includes two supported ways of interop with sklearn:
- Using
cuml.accelfor zero-code-change. Models fit undercuml.accelcan be saved and reloaded in environments without cuml, letting you fit on GPU and deploy on CPU. See https://docs.rapids.ai/api/cuml/stable/zero-code-change/ for more info. - Using
cuml_estimator.as_sklearn()(as Dante noted above) to convert acumlestimator to a native sklearn one.