Index thinning - #226
Merged
Merged
Conversation
sjfleming
reviewed
Jul 16, 2026
sjfleming
left a comment
There was a problem hiding this comment.
Some comments about the "carryover" concept and whether it can be eliminated. If it's necessary, that's okay. Just looking for a potential simplification
| need = training_sample_size - total_training_rows | ||
| train_dfs.append(df.iloc[:need]) | ||
| carry_df = df.iloc[need:] | ||
| total_training_rows += need |
There was a problem hiding this comment.
is need right, or is it len(df) - need ?
|
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.



Add allow-list (thinning) support to create_vsindex
Lets you build a TileDB IVF_FLAT index over a subsample of an existing embedding set without regenerating embeddings. Previously create_vsindex indexed every cell in every
batch file; now an optional --allow-list-csv / allow_list_csv= (local path or gs://, single soma_joinid column with header) restricts indexing to the listed cells and
drops the rest.
Behavior
is indexed exactly once. Training fills to --training-sample-size allowed cells; the boundary batch is appended whole and may slightly overshoot, matching the existing
unfiltered path.
Empty chunks short-circuit instead of issuing zero-row update_batch calls.
per-batch call — material at millions of IDs across thousands of batches.
Also in here
sets are disjoint and together cover exactly the allow-list.
linux/aarch64).
Closes #225