Repository navigation
Conversation
Problem Positive sample counts drop the row IDs requested by the Torch dataset. Solution Pass the row ID request to the native full and filtered scans. For take sampling, add the system field to a copy of the requested projection. Result Sampled row IDs match the selected records across fragments and deletions. The single-column partial filter keeps its previous row set.
### Problem With `with_row_id=True`, sampled Torch batches contain a vector column and `_rowid`. Calling `size()` on the batch raised `AttributeError` during accelerated `IVF_PQ` training. ### Solution Read both columns from the batch in `compute_partitions()`. A regression test checks sampled partition assignments against source row IDs across three fragments. ### Result All six failing CI cases passed locally. The vector index, Torch KMeans, and sampler suites had 465 passing tests and six GPU-dependent skips.
Xuanwo
approved these changes
Dec 2, 2026
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.
Problem
Sampled Torch batches omit the row IDs requested by
with_row_id=True.Solution
Forward the request to native scans. For uniform and stratified takes, add
_rowidto a copy of the projection and keep any existing expression under that name. Partial filtered sampling keeps its existing single-column filter and row selection.Result
Sampled IDs match the scanner across fragments and deletions in both row-ID modes. All 131 selected sampler tests passed. The separate distributed loader test fails on main because its fixture constructs the wrong sampler.
Fixes #11734