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

Add to_sklearn and from_sklearn APIs to serialize to CPU sklearn-estimators for supported models #6102

Draft
wants to merge 3 commits into
base: branch-24.12
Choose a base branch
from

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented Oct 8, 2024

No description provided.

@github-actions github-actions bot added the Cython / Python Cython or Python issue label Oct 8, 2024
@betatim
Copy link
Member

betatim commented Nov 19, 2024

Why have the methods do both the conversion cuml<>sklearn and the serialisation? Having a way to convert to and from scikit-learn seems like a useful thing by itself. Maybe because you have your own way of serialising the model, or because you need a particular type of model or who-knows-what.

So to serialise it you'd do something like pickle.dumps(cuml_est.to_sklearn()) (or dill, joblib, ...)

How hard would it be to have cuml.from_sklearn(estimator)? As in one top level function that takes a scikit-learn estimator and converts it to the cuml equivalent? It seems like it should be easy to figure out the estimator's class name: "just look at .__class__.__name__" but I wonder if there is a trap here?


Name bike shedding: if we don't save things to a file, how about as_sklearn? A bit like other functions that do type conversion like astype.

If we do save to a file, then save_sklearn and load_sklearn? Basically getting words like "save" and "load" in there to make it clear that this is about storing things (to a file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants