-
Notifications
You must be signed in to change notification settings - Fork 834
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
Unable to run saveNativeModel for VWRegressionModel #1364
Comments
@memoryz Thanks for the PR. Do you also have an example on how to dump the model in readable state (feature name and their co-efficients in readable format) and deserialise it back to VWRegressionModel for prediction in future ? |
@arka-nitd, the fix will allow you to save the native model as a binary file on your storage. To dump the model in readable state, does
Deserialization:
|
@memoryz I tried print(model.getReadableModel()) but this return the feature hash and their co-efficient. What i need is the feature names and their co-efficient, similar to what --invert-hash parameter would output. |
Sorry I'm not familiar with the internals of VW. Can you post a new issue for your questions? Maybe @eisber can help answer. |
@arka-nitd can you share a small repro of you current feature/training pipeline. Unfortunately, when using VWFeaturizer the reverse mapping is lost. Since this request comes in repeated, this might be a good new feature. @jackgerrits and I brainstormed a bit, but it's not straight forward. The VWfeaturizer already hashes the data, but without namespaces (at least from what I remember). So there's the additional complexity on namespaces. Additionally it depends on the learning algo how the features are mapped to weights. |
Environment
Databricks 10.1ML Runtime.
To Reproduce
I am trying to run the Linear Regression example provided
Now when trying to save the model using .saveNativeModel
Getting following error
When trying with .save it is working but the model saved is in some binary which is not readable.
directory structure
End Goal
To be able to save the model in some readable format preserving the feature name along with the co-efficients.
I was referring to this PR #821 but the code to generate readable model with the feature name was removed in a commit. Not sure why ?
Also using model.getReadableModel() just shows the indexes and the co-efficients. If at all using VWFeaturizer the feature names can be derived, how can it be done ? I was unable to find any examples.
Tried with following environment and versions :
10.1ML + 0.9.4 & 0.9.5
9.1ML LTS + 0.9.4 & 0.9.5
So my questions are
Thanks,
Arka
The text was updated successfully, but these errors were encountered: