-
Notifications
You must be signed in to change notification settings - Fork 853
chore: Remove deprecated Bing Search APIs and refactor dependent tests #2451
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the deprecated BingImageSearch and related components following the retirement of Bing Search API v7. The removal includes Scala and Python implementations, test files, and associated schemas. Tests that previously relied on BingImageSearch for downloading images have been refactored to use a new downloadBytes utility function with static datasets.
Key Changes:
- Removed deprecated Bing Search components (BingImageSearch, ImageSearchSchemas, ImageSearchSuite)
- Introduced
VisionUtilsand enhancedFormRecognizerUtilstraits withdownloadBytesfunctionality to replace BingImageSearch download capabilities - Refactored test suites to use direct HTTP downloads instead of the deprecated BingImageSearch API
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| core/src/test/scala/com/microsoft/azure/synapse/ml/Secrets.scala | Removed BingSearchKey secret reference |
| core/src/main/scala/com/microsoft/azure/synapse/ml/logging/FeatureNames.scala | Removed BingImage feature name from AI Services |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/vision/ComputerVisionSuite.scala | Added VisionUtils trait with downloadBytes functionality; refactored all vision test suites to use new download approach |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/form/FormRecognizerSuite.scala | Added downloadBytes utility to FormRecognizerUtils; simplified createTestDataframe with default parameter |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/bing/ImageSearchSuite.scala | Deleted entire test suite for deprecated BingImageSearch |
| cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/bing/ImageSearchSchemas.scala | Deleted schema definitions for BingImageSearch API |
| cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/bing/BingImageSearch.scala | Deleted main BingImageSearch implementation |
| cognitive/src/main/python/synapse/ml/services/bing/BingImageSearch.py | Deleted Python wrapper for BingImageSearch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/form/FormRecognizerSuite.scala
Outdated
Show resolved
Hide resolved
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/form/FormRecognizerSuite.scala
Outdated
Show resolved
Hide resolved
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/form/FormRecognizerSuite.scala
Outdated
Show resolved
Hide resolved
...tive/src/test/scala/com/microsoft/azure/synapse/ml/services/vision/ComputerVisionSuite.scala
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
|
|
||
|
|
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Excessive whitespace: Multiple blank lines (2) before override implicit lazy val dfEq. Consider reducing to a single blank line to maintain consistency.
| } | ||
|
|
||
|
|
||
|
|
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Excessive whitespace: Multiple blank lines (2) before override def assertDFEq(). Consider reducing to a single blank line to maintain consistency.
| } | ||
|
|
||
|
|
||
|
|
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Excessive whitespace: Multiple blank lines (2) before override def assertDFEq(). Consider reducing to a single blank line to maintain consistency.
| } | ||
|
|
||
|
|
||
|
|
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Excessive whitespace: Multiple blank lines (2) before override def testObjects(). Consider reducing to a single blank line to maintain consistency.
...tive/src/test/scala/com/microsoft/azure/synapse/ml/services/vision/ComputerVisionSuite.scala
Outdated
Show resolved
Hide resolved
…es/form/FormRecognizerSuite.scala Co-authored-by: Copilot <[email protected]>
…es/form/FormRecognizerSuite.scala Co-authored-by: Copilot <[email protected]>
…es/form/FormRecognizerSuite.scala Co-authored-by: Copilot <[email protected]>
…es/vision/ComputerVisionSuite.scala Co-authored-by: Copilot <[email protected]>
…es/vision/ComputerVisionSuite.scala Co-authored-by: Copilot <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2451 +/- ##
==========================================
- Coverage 84.38% 82.51% -1.88%
==========================================
Files 335 334 -1
Lines 17690 17598 -92
Branches 1619 1579 -40
==========================================
- Hits 14928 14521 -407
- Misses 2762 3077 +315 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When using file input in OpenAIPrompt before, a text message will be sent along: The name of the file to analyze is %s.\nHere is the content:\n, this will cause info leak in file name, as long as extra token used. So it's for the best to remove this piece of message. authored-by: Wendong Li <[email protected]>
* fix: Make translation test less flaky * Make another check more flexible * increased flexibility * fix scalastyle
Related Issues/PRs
Fixes broken build and tests caused by the retirement of Bing Search API v7.
What changes are proposed in this pull request?
Briefly describe the changes included in this Pull Request.
This PR removes all dependencies on the deprecated
BingImageSearchandBingSearchAPIWrappercomponents, which are no longer functional following the retirement of the Bing Search API v7.Key Changes:
BingImageSearch(Scala & Python),ImageSearchSuite, andBingSearchAPIWrapperreferences.Quickstart - Snow Leopard Detection.ipynb: Replaced dynamic Bing Search with a static dataset of snow leopard images. Implemented a customdownload_bytesUDF to replace theBingImageSearchdownloader.Quickstart - Analyze Celebrity Quotes.ipynb: Replaced Bing Search query with a static list of celebrity image URLs.FormRecognizerSuite,ComputerVisionSuite,OCRSuite, and others to removeBingImageSearchdependency.VisionUtilstrait with adownloadBytesUDF to handle image downloading for tests, ensuring they remain deterministic and fast.How is this patch tested?
Verification Steps:
FormRecognizerSuite,ComputerVisionSuite, etc.) compile successfully.sbt "testOnly *FormRecognizerSuite *ComputerVisionSuite"to confirm the new static data approach works as expected.bing-search-keyreferences.BingImageSearchorbing-search-keyremain in the active codebase.Does this PR change any dependencies?
Removed internal dependencies on
BingImageSearchand external calls to Bing Search API.Does this PR add a new feature? If so, have you added samples on website?