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

Fit persistence #4

Open
glutamate opened this issue May 2, 2023 · 1 comment
Open

Fit persistence #4

glutamate opened this issue May 2, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@glutamate
Copy link

glutamate commented May 2, 2023

Hi, this project looks incredible. Every time I compare sklearn with JS ML libraries, the python equivalents are much faster and more robust. I am looking to integrate sklearn with Saltcorn, an open-source no-code builder I wrote.

Is there a way to persist model fits? in python i can pickle a fit, save to database or file, and pickle.loads when it is time to make a prediction. Example:

# fit
clf = Pipeline(steps=[('preprocessor', ...),
                      ('classifier', LinearRegression())])

clf.fit(df_x, df_y)

str1=pickle.dumps(clf)

# load and predict
clf2 = pickle.loads(str1)
pred=clf2.predict(pandas.DataFrame.from_dict(...))

Is there a way to get the underlying python object as a blob or as JSON ? and to construct the JS object again?

@transitive-bullshit transitive-bullshit added the enhancement New feature or request label Nov 21, 2024
@transitive-bullshit
Copy link
Owner

This should be possible, but we need a good example of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants