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

Enable the C wrapper to extract model to memory and initialize model from memory #1189

Merged
merged 2 commits into from
Apr 18, 2017

Conversation

jrmarkle
Copy link
Contributor

This workaround allows library users to load and store the model directly without using the file system.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.696% when pulling 0b93da4 on jrmarkle:memory_io into 33e9da6 on JohnLangford:master.

@JohnLangford
Copy link
Member

@eisber I thought you had looked into RAM-based model storage in the past? What's the status?

@eisber
Copy link
Collaborator

eisber commented Feb 13, 2017 via email

@jrmarkle
Copy link
Contributor Author

Yes, the PR includes memory_io_buf for that purpose.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 69.675% when pulling 02c8ea4 on jrmarkle:memory_io into 33e9da6 on JohnLangford:master.

@JohnLangford
Copy link
Member

I'm hazy on an important detail here. @eisber is this functionality already there? If not, why is there an interface?
(The confidence stuff seems desirable.)

@eisber
Copy link
Collaborator

eisber commented Apr 5, 2017

@JohnLangford it's not there yet. It's only in the C# side. I think this is good.

@JohnLangford JohnLangford merged commit 2972826 into VowpalWabbit:master Apr 18, 2017
@JohnLangford
Copy link
Member

Merged in, thanks.

JohnLangford pushed a commit that referenced this pull request May 3, 2017
* Add prerequisites: zlib-devel (or zlib1g-dev) (#1226)

* Added zlib-devel (or zlib1g-dev) to Prerequisites

* Update README.md

* do not use deprecated sklearn module (#1223)

* Enable the C wrapper to extract model to memory and initialize model from memory (#1189)

* extract model to memory and initialize model from memory

* add get_confidence C wrapper function

* JNI concurrent interface extensions (#1215)

* replaced NativeUtils with Java's own library loader; Added MulticlassMultilabel Interface to JNI; generated OS dependant lib files; modified pom to include generated lib file in java library path; removed unused variable in multiclassleaner;

* Since an instance of vw model is not thread safe for multiple predictions in parallel, we introduce a concurrent learner (for multilabel and multiline multiclass learners) that works with a pool of learners to get high throughput for predictions in an online setting.

* Learner pool now creates vw instances of the same model using seed_vw_model method instead of initialize. Former method reuses shared variables from the seed learner instance and hence has much less memory footprint in comparison to latter which allocates new memory for all new instances created.

* Fixed space alignment issue and changed getLearner api to return Optional to stop any unwanted NPEs.

* Removed TODO as we now use seed_vw_model to instantiate multiple learner instances of the same model.

* remove java8 components

* added method to return Future in abstract concurrent predictor; added method to create concurrent predictor using thread pool and predictor pool of same size in factory;

* tweaks
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.

4 participants