GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — fix(huggingface_hub, cohere): stop swallowing stream iteration errors by intertermux-code · Pull Request #7946 · getsentry/sentry-python Conversation
Contributor
The HuggingFace Hub and Cohere streaming iterators wrapped the entire Fix (following the repo's own Verified: 4 new regression tests ( Fixes #7889.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThe streaming iterators wrapped the whole chunk loop in capture_internal_exceptions(), which catches everything including provider errors raised mid-iteration, so a truncated answer looked complete and nothing was reported. Run iteration/yield outside it (only span bookkeeping stays inside), record the provider error, finish the span with error status, and re-raise. Fixes getsentry#7889.
alexander-alderman-webb
requested changes
Comment on lines
+270
to
+275
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Capturing an exception here changed behavior.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — removed the capture. The exception now just bubbles out after the span finishes with error status, and I made the same change in both huggingface_hub streaming iterators for consistency. Tests updated to assert propagation + span status only.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsPer review: iterator exceptions should just bubble out. The span still finishes with error status and the exception re-raises, but we no longer send the provider error as a Sentry event -- that was behavior change versus running without the SDK. Same change in both huggingface_hub streaming iterators for consistency; the three regression tests now assert propagation + span status only.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Hugging Face Hub and Cohere integrations swallow errors raised while iterating a streamUh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |