Skip to content

test(python): exercise the fixed batch sampler in the distributed loader test - #11737

Merged
Xuanwo merged 1 commit into
lance-format:mainfrom
zhangyue19921010:test/python-distributed-fixed-batch-sampler
Dec 2, 2026
Merged

Xuanwo merged 1 commit into
lance-format:mainfrom
zhangyue19921010:test/python-distributed-fixed-batch-sampler

Conversation

@zhangyue19921010

Copy link
Copy Markdown
Collaborator

Problem

The distributed DataLoader test fails before it loads a batch because it constructs the dataset scan sampler with fixed index-batch arguments.

Solution

Use ShardedFixedBatchSampler in the test worker. The existing assertions compare the returned IDs with the sampler indices and check each rank's total.

Result

All 121 sampler tests passed. The worker's assertions also passed with two Gloo ranks. CUDA/NCCL was unavailable on this host.

Fixes #11736

…der test

Problem

The integration worker passes a row count and batch size to the dataset
scan sampler, so it fails before checking any DataLoader batches.

Solution

Construct ShardedFixedBatchSampler, the index-batch iterator expected
by the DataLoader and the existing assertions.

Result

The worker can compare each returned ID and check the total per rank.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-python Python bindings chore labels Dec 2, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

The fixed sampler matches the worker’s index-batch contract and restores its existing ID and per-rank count assertions. Local verification: 120 sampler tests passed, and the worker passed with one and two Gloo ranks. CUDA/NCCL was unavailable.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Dec 2, 2026
@Xuanwo
Xuanwo merged commit 33d53c0 into lance-format:main Dec 2, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings chore K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: distributed fixed-batch sampler test fails before loading data

2 participants