Skip to content

Fix HF Inference API test model - #40844

Open
aIbrahiim wants to merge 3 commits into
apache:masterfrom
aIbrahiim:fix-hf-api-model
Open

aIbrahiim wants to merge 3 commits into
apache:masterfrom
aIbrahiim:fix-hf-api-model

Conversation

@aIbrahiim

Copy link
Copy Markdown
Contributor

Fixes: #30799

@github-actions github-actions Bot added python size/s S: 10-49 lines changed labels Oct 27, 2026

@github-actions github-actions 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.

📋 Review Summary

This PR resolves a test failure in HuggingfaceInferenceAPITest (and its subclass HuggingfaceInferenceAPIGCSLocationTest) by replacing sentence-transformers/all-mpnet-base-v2 with BAAI/bge-small-en-v1.5, which supports the /pipeline/feature-extraction endpoint on the Hugging Face Inference API. It also improves test stability by asserting on the embedding vector dimension and element types rather than a brittle rounded scalar value.

🔍 General Feedback

  • The model replacement and updated shape/type assertion are clean, well-reasoned, and make the integration test more resilient against minor numerical variations across remote API updates.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @damccorm for label python.
Backup reviewer: tvalentyn (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.90%. Comparing base (2213e54) to head (dc25770).
⚠️ Report is 43 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #40844       +/-   ##
===========================================
+ Coverage        0   79.90%   +79.90%     
===========================================
  Files           0      493      +493     
  Lines           0    83479    +83479     
===========================================
+ Hits            0    66703    +66703     
- Misses          0    16776    +16776     
Flag Coverage Δ
python 79.90% <ø> (?)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The PostCommit Python Dependency job is flaky

1 participant