fix: persist --ccb_no_slot_index across model save/load#4914
Merged
JohnLangford merged 5 commits intomasterfrom Mar 17, 2026
Merged
fix: persist --ccb_no_slot_index across model save/load#4914JohnLangford merged 5 commits intomasterfrom
JohnLangford merged 5 commits intomasterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4912 —
--ccb_no_slot_indexwas 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 withm_keep = trueinto the model file's command line (seeparse_regressor.cc:417). Other CCB options like--ccb_explore_adfand--cb_typealready had.keep().Fix: Add
.keep()to theccb_no_slot_indexoption definition inconditional_contextual_bandit.cc.Test plan
NoSlotIndexOptionPersistsAcrossSaveLoadtest: trains with--ccb_no_slot_index, saves model, reloads, verifieswas_supplied("ccb_no_slot_index")is true and interactions do not include the ccb_id namespace