Skip to content

feat(telemetry): python stream-group semantics and user documentation - #937

Merged
sirahd merged 2 commits into
sira/telemetry-5-pkgfrom
sira/telemetry-6-bindings-docs
Aug 11, 2026
Merged

sirahd merged 2 commits into
sira/telemetry-5-pkgfrom
sira/telemetry-6-bindings-docs

Conversation

@sirahd

@sirahd sirahd commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Part 6 of 6 of the client transfer telemetry stack, split out of #919 for review. Each PR in the stack compiles and passes CI on its own.

Makes the Python download stream group abort rather than finish when its with
block raises, so an exception is reported as an abandoned transfer instead of a
successful one, and documents the telemetry the client now emits along with how
to turn it off.


Note

Low Risk
Mostly additive Python API surface and documentation. Telemetry outcome reporting changes only for stream-group context-manager exception paths; transfer behavior is otherwise unchanged.

Overview
Exposes finish() and abort() on the Python XetDownloadStreamGroup, plus context-manager support, so callers can explicitly close a stream group and report transfer telemetry.

On a clean with exit the group finishes; on an exception it aborts instead, leaving the session unfinalized so Drop derives the outcome from what actually transferred rather than recording a failed download as ok.

Also documents client transfer telemetry in the README (what is sent, how to disable it, and tuning knobs) and adds the stack’s API-change note.

Reviewed by Cursor Bugbot for commit 9bf2fc6. Bugbot is set up for automated code reviews on this repo. Configure here.

Makes the Python download stream group abort rather than finish when its with
block raises, so an exception is reported as an abandoned transfer instead of a
successful one, and documents the telemetry the client now emits along with how
to turn it off.
@sirahd
sirahd marked this pull request as ready for review August 10, 2026 23:05
The HF_HUB_DISABLE_TELEMETRY / HF_HUB_OFFLINE opt-outs are no longer
handled by xet-core, so the README and api_changes note describing them
were stale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sirahd
sirahd merged commit 77fc84d into main Aug 11, 2026
10 checks passed
@sirahd
sirahd deleted the sira/telemetry-6-bindings-docs branch August 11, 2026 19:52
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.

2 participants