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

String import/export #2

Closed
wants to merge 3 commits into from
Closed

Conversation

leonardoobaptistaa
Copy link

This PR add export_model_to_binary_string and
import_model_from_binary_string to Model class and update README with new
documentation.

The goal here is to have an API to import/export models without the need to use
files.

@ankane
Copy link
Owner

ankane commented Mar 9, 2020

Hey @leonardoobaptistaa, thanks for the PR (and sorry for the delay)! I like the idea. I think we can probably use Ruby's StringIO class to accomplish this with the existing methods.

Save

io = StringIO.new # or any other IO object
model.save_model(io)
str = io.read

Load

io = StringIO.new(str) # or any other IO object
model.load_model(io)

What do you think?

@ankane
Copy link
Owner

ankane commented Oct 7, 2020

Cleaning up stale PRs

@ankane ankane closed this Oct 7, 2020
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