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

Fix pickling #207

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Fix pickling #207

merged 1 commit into from
Feb 18, 2020

Conversation

RichardWarfield
Copy link
Contributor

This PR addresses #110 and #157 (pickling of Python models) as follows:

  • Add save_to/load_from_string methods to C++ SvmModel class. These are basically the same as the save_to/load_from_file methods but write to a string instead of a file. Refactor the latter functions to work through the new functions (in other words creating a string then saving it to a file) to avoid code duplication.
  • Create the corresponding extern "C"{ } functions in thundersvm-scikit.cpp
  • Add save_to/load_from_string methods to python SvmModel class
  • Finally, add getstate and setstate functions which enable pickling.

…__ functions on python SvmModel to enable pickling
@QinbinLi QinbinLi merged commit 8ac8ec3 into Xtra-Computing:master Feb 18, 2020
@QinbinLi
Copy link
Member

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

2 participants