Skip to content

fix: persist --ccb_no_slot_index across model save/load#4914

Merged
JohnLangford merged 5 commits intomasterfrom
fix/ccb-no-slot-index-persistence
Mar 17, 2026
Merged

fix: persist --ccb_no_slot_index across model save/load#4914
JohnLangford merged 5 commits intomasterfrom
fix/ccb-no-slot-index-persistence

Conversation

@JohnLangford
Copy link
Copy Markdown
Member

Summary

Fixes #4912--ccb_no_slot_index was silently dropped when saving and reloading a model, causing slot index injection to be re-enabled on the reloaded workspace.

Root cause: The option was missing the .keep() flag. VW only serializes options with m_keep = true into the model file's command line (see parse_regressor.cc:417). Other CCB options like --ccb_explore_adf and --cb_type already had .keep().

Fix: Add .keep() to the ccb_no_slot_index option definition in conditional_contextual_bandit.cc.

Test plan

  • New NoSlotIndexOptionPersistsAcrossSaveLoad test: trains with --ccb_no_slot_index, saves model, reloads, verifies was_supplied("ccb_no_slot_index") is true and interactions do not include the ccb_id namespace
  • Existing CCB tests continue to pass (CI)

Add missing .keep() flag to the ccb_no_slot_index option so it is
serialized into the model file's command line. Without this, the option
was silently dropped when reloading a saved model, causing slot index
injection to be re-enabled.

Fixes #4912
The test was writing to a relative path that didn't exist in the CI
test runner's working directory.
The -f flag saves on finish(), which must be called explicitly — the
destructor alone does not trigger the model save.
Adding .keep() to ccb_no_slot_index changes its help output from
"(type: bool)" to "(type: bool, keep)". Update the reference file
to match.
@JohnLangford JohnLangford merged commit c35d4dd into master Mar 17, 2026
84 checks passed
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.

--ccb_no_slot_index is not persisted when reloading a model

1 participant