Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch HfHubHTTPError in hf-dataset-llm-eval example #848

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Jan 21, 2025

@mattseddon mattseddon self-assigned this Jan 21, 2025
Copy link

cloudflare-workers-and-pages bot commented Jan 21, 2025

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: db7e73f
Status: ✅  Deploy successful!
Preview URL: https://abdeaa78.datachain-documentation.pages.dev
Branch Preview URL: https://improve-hf-example.datachain-documentation.pages.dev

View logs

@mattseddon mattseddon force-pushed the improve-hf-example branch 2 times, most recently from a20da5b to 7aba619 Compare January 21, 2025 23:05
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.59%. Comparing base (b1d4f2a) to head (db7e73f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #848   +/-   ##
=======================================
  Coverage   87.59%   87.59%           
=======================================
  Files         128      128           
  Lines       11382    11382           
  Branches     1540     1540           
=======================================
  Hits         9970     9970           
  Misses       1025     1025           
  Partials      387      387           
Flag Coverage Δ
datachain 87.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattseddon mattseddon marked this pull request as ready for review January 21, 2025 23:27
@mattseddon mattseddon requested a review from a team January 21, 2025 23:27
@mattseddon mattseddon force-pushed the improve-hf-example branch 2 times, most recently from ea88557 to 2463dc6 Compare January 24, 2025 00:44
Copy link
Contributor

@dreadatour dreadatour left a comment

Choose a reason for hiding this comment

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

👍

response_format={"type": "json", "value": DialogEval.model_json_schema()},
)
except HTTPError:
return DialogEval(result="Error", reason="Huggingface API returned an error.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Strictly saying it can also be not only an error from Huggingface API, but also general HTTP error (404 Not Found, for example), we may want to raise something like "Error while interacting with the Hugging Face API".

@mattseddon mattseddon enabled auto-merge (squash) January 27, 2025 10:24
@mattseddon mattseddon merged commit 60aed77 into main Jan 27, 2025
37 checks passed
@mattseddon mattseddon deleted the improve-hf-example branch January 27, 2025 10:35
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