VowpalWabbit / vowpal_wabbit

Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.
https://vowpalwabbit.org
Other
8.49k stars 1.93k forks source link

Support for multi-line featuers in --audit_regressor #4675

Closed groceryheist closed 11 months ago

groceryheist commented 11 months ago

Describe the bug

I want to analyze a model fit using --cb_explore_adf. I just want to see the feature weights of the final trained model. I think I can use --invert_hash for this, but I also tried using --audit_regressor and found a bug.

[critical] vw (learner.cc:366): Tried to use a multiline learner as a singleline learner. Name: shared_feature_merger

How to reproduce

Train a model with --cb_explore_adf.
Run ./vw -t -i saved_model.model -d saved_data.head --audit_regressor output

Version

9.9.0

OS

Linux

Language

CLI

Additional context

No response

jackgerrits commented 11 months ago

The error message is correct - when using a multiline learner such as cb_explore_adf --audit_regressor is not supported.

--invert_hash can be used for inspecting model weights. There is also another set of options for getting this kind of output but in a machine readable JSON format (see here). You can also do this interactively in Python (see here).