Skip to content

fix: stop dataset pagination at the reported split boundary - #84

Open
Afloat16 wants to merge 1 commit into
billion-token-one-task:masterfrom
Afloat16:fix/http-dataset-page-boundaries-20261202-r2
Open

Afloat16 wants to merge 1 commit into
billion-token-one-task:masterfrom
Afloat16:fix/http-dataset-page-boundaries-20261202-r2

Conversation

@Afloat16

@Afloat16 Afloat16 commented Dec 2, 2026

Copy link
Copy Markdown

Problem

When a requested sample cap exceeds the dataset's remaining rows, the HTTP fallback keeps requesting pages after it has reached num_rows_total. It also asks for a full page when the response has already identified a smaller remaining window. This adds a redundant network request to short splits and holdout windows, and makes an otherwise complete fetch depend on an unnecessary final response.

Changes

Stop once the collected window reaches the advertised split size and bound later page lengths to the known remaining rows. Preserve the requested sample cap and the existing empty-page fallback when the service does not report a total.

Validation

  • 2 failed, 2 passed on base.
  • Controlled responses verify exact request offsets and lengths for a complete short split, an offset near the end, an absent total, and a smaller requested cap. The short-split example decreases from three requests to two, and the final-row example from two requests to one.
  • python -m pytest -q tests/test_http_dataset_page_boundaries.py tests/test_runner_contract_and_failure_policy.py tests/test_served_model_provenance.py: 44 passed, 26 subtests passed.

@cla-assistant

cla-assistant Bot commented Dec 2, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Dec 2, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

1 participant