chore: remove retired Azure AI Anomaly Detector components - #2605
chore: remove retired Azure AI Anomaly Detector components#2605ranadeepsingh wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Hey @ranadeepsingh 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
There was a problem hiding this comment.
Pull request overview
This PR retires SynapseML’s Azure AI Anomaly Detector pipeline stages now that the upstream service has shut down and all anomalydetector REST endpoints return HTTP 410 (Gone). The approach keeps existing classes/params/serialization so saved pipelines still load, but makes runtime behavior deterministic by failing fast with an actionable UnsupportedOperationException and updating tests/docs/CI accordingly.
Changes:
- Retire univariate and multivariate anomaly stages by throwing a consistent
UnsupportedOperationException(instead of attempting HTTP calls that now always 410). - Replace live-service test suites with an offline
AnomalyDetectionRetirementSuite, and update fuzzing and notebook test exclusions. - Update docs/notebooks to remove runnable anomaly examples and add retirement guidance; make CI deterministic by removing
FLAKYfor the anomaly unit test matrix job.
Show a summary per file
| File | Description |
|---|---|
| src/test/scala/com/microsoft/azure/synapse/ml/core/test/fuzzing/FuzzingTest.scala | Exempts retired anomaly stages from fuzzing coverage checks. |
| pipeline.yaml | Removes FLAKY flag from the anomaly unit-test matrix entry. |
| docs/Quick Examples/transformers/cognitive/_AnomalyDetection.md | Replaces runnable anomaly examples with a retirement notice and keeps API tables. |
| docs/Quick Examples/estimators/cognitive/_MAD.md | Adds retirement warning to the multivariate anomaly estimator quick example. |
| docs/Explore Algorithms/AI Services/Quickstart - Predictive Maintenance.ipynb | Updates notebook to retirement notice and migration guidance. |
| docs/Explore Algorithms/AI Services/Overview.ipynb | Removes anomaly-detector content so the overview notebook remains runnable. |
| docs/Explore Algorithms/AI Services/Multivariate Anomaly Detection.ipynb | Updates notebook to retirement notice and migration guidance. |
| core/src/test/scala/com/microsoft/azure/synapse/ml/nbtest/SynapseTests.scala | Excludes Predictive Maintenance notebook from Synapse notebook runs. |
| core/src/test/scala/com/microsoft/azure/synapse/ml/nbtest/DatabricksUtilities.scala | Excludes Predictive Maintenance notebook from Databricks notebook runs. |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/anomaly/MultivariateAnamolyDetectionSuite.scala | Removes dead (commented-out) live-service multivariate suite. |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/anomaly/AnamolyDetectionSuite.scala | Removes live-service univariate suite that cannot pass post-shutdown. |
| cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/anomaly/AnomalyDetectionRetirementSuite.scala | Adds offline retirement-contract assertions for all six stages. |
| cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/anomaly/MultivariateAnomalyDetection.scala | Makes multivariate fit/transform fail fast via the retirement helper. |
| cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/anomaly/AnomalyDetection.scala | Introduces shared retirement notice + makes base transform fail fast for univariate stages. |
Review details
Suppressed comments (3)
docs/Quick Examples/transformers/cognitive/_AnomalyDetection.md:36
- The DocTable sourceLink points at a path that doesn't exist in this repo (…/ml/cognitive/AnomalyDetection.scala). This will produce a broken GitHub source link in the docs; please update it to the actual Scala source location under services/anomaly.
<DocTable className="DetectAnomalies"
py="synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectAnomalies"
scala="com/microsoft/azure/synapse/ml/cognitive/DetectAnomalies.html"
csharp="classSynapse_1_1ML_1_1Cognitive_1_1DetectAnomalies.html"
sourceLink="https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala" />
docs/Quick Examples/transformers/cognitive/_AnomalyDetection.md:44
- The DocTable sourceLink points at a path that doesn't exist in this repo (…/ml/cognitive/AnomalyDetection.scala). This will produce a broken GitHub source link in the docs; please update it to the actual Scala source location under services/anomaly.
<DocTable className="SimpleDetectAnomalies"
py="synapse.ml.cognitive.html#module-synapse.ml.cognitive.SimpleDetectAnomalies"
scala="com/microsoft/azure/synapse/ml/cognitive/SimpleDetectAnomalies.html"
csharp="classSynapse_1_1ML_1_1Cognitive_1_1SimpleDetectAnomalies.html"
sourceLink="https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala" />
docs/Quick Examples/transformers/cognitive/_AnomalyDetection.md:28
- The DocTable sourceLink points at a path that doesn't exist in this repo (…/ml/cognitive/AnomalyDetection.scala). This will produce a broken GitHub source link in the docs; please update it to the actual Scala source location under services/anomaly.
This issue also appears in the following locations of the same file:
- line 32
- line 40
<DocTable className="DetectLastAnomaly"
py="synapse.ml.cognitive.html#module-synapse.ml.cognitive.DetectLastAnomaly"
scala="com/microsoft/azure/synapse/ml/cognitive/DetectLastAnomaly.html"
csharp="classSynapse_1_1ML_1_1Cognitive_1_1DetectLastAnomaly.html"
sourceLink="https://github.com/microsoft/SynapseML/blob/master/cognitive/src/main/scala/com/microsoft/azure/synapse/ml/cognitive/AnomalyDetection.scala" />
- Files reviewed: 14/14 changed files
- Comments generated: 0
- Review effort level: Lite
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
26f79f0 to
c67d0cc
Compare
The Azure AI Anomaly Detector service has been retired by Microsoft. Every `anomalydetector` REST endpoint now answers HTTP 410 (Gone), verified across paths, API versions and regions: 410 westus2 /anomalydetector/v1.1/timeseries/entire/detect 410 westus2 /anomalydetector/v1.1/timeseries/last/detect 410 westus2 /anomalydetector/v1.1/timeseries/changepoint/detect 410 westus2 /anomalydetector/v1.1/multivariate/models 410 westus2 /anomalydetector/v1.0/timeseries/entire/detect 410 eastus /anomalydetector/v1.1/timeseries/entire/detect 401 westus2 /vision/v3.2/analyze (control, same host) 401 westus2 /text/analytics/v3.1/languages (control, same host) Controls on the same hosts still answer 401, ruling out key, region, network and DNS problems: the API is gone. The stages were already `@deprecated` in-repo pointing at IsolationForest. Microsoft's replacement is the open-source `microsoft/anomaly-detector` library rather than a REST API, so there is nothing to migrate these stages onto. This removes all Anomaly Detector code, tests, docs and CI wiring, following the same approach as the Bing Search v7 removal (microsoft#2494). Changes: - Delete AnomalyDetection.scala, AnomalyDetectorSchemas.scala, MultivariateAnomalyDetection.scala and MultivariateAnomalyDetectorSchemas.scala (DetectAnomalies, DetectLastAnomaly, SimpleDetectAnomalies, SimpleFitMultivariateAnomaly, SimpleDetectMultivariateAnomaly, DetectLastMultivariateAnomaly) - Delete AnamolyDetectionSuite.scala and MultivariateAnamolyDetectionSuite.scala (the latter was 340 lines of entirely commented-out code) - Update the synapse.ml.cognitive.anomaly deprecation shim - Remove the anomaly test matrix entry from pipeline.yaml - Remove the Anomaly feature name and the AnomalyApiKey and MADTestStorageKey secrets - Remove all Anomaly Detector fuzzing test exemptions, including the stale `services.DetectMultivariateAnomaly` entry - Delete _AnomalyDetection.md, _MAD.md and estimators_cognitive.md, which held no other content, and drop their entries from transformers_cognitive.md - Delete the Multivariate Anomaly Detection and Predictive Maintenance notebooks, remove the anomaly cells from the AI Services overview notebook, and drop the now-dead notebook exclusions from DatabricksUtilities and SynapseTests - Update sidebars.js, docusaurus.config.js and the docgen manifest; redirects that pointed at the deleted pages now point at the Isolation Forests quickstart so existing inbound links keep working - Remove the unused madTestFile benchmark helper Also fixes a telemetry bug this surfaced: FormRecognizerV3 logged `FeatureNames.AiServices.Anomaly` instead of `.Form`, so its usage was misattributed to Anomaly Detector. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3a108ab7-6879-4fa6-81de-ef2d43eb3ec5
c67d0cc to
9478318
Compare
|
/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 #2605 +/- ##
==========================================
+ Coverage 84.71% 85.93% +1.22%
==========================================
Files 335 331 -4
Lines 17882 17404 -478
Branches 1639 1629 -10
==========================================
- Hits 15148 14956 -192
+ Misses 2734 2448 -286 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
The Azure AI Anomaly Detector service has been retired by Microsoft. Every
anomalydetectorREST endpoint now answers HTTP 410 (Gone), verified from anexternal host across paths, API versions and regions:
/anomalydetector/v1.1/timeseries/entire/detect/anomalydetector/v1.1/timeseries/last/detect/anomalydetector/v1.1/timeseries/changepoint/detect/anomalydetector/v1.1/multivariate/models/anomalydetector/v1.0/timeseries/entire/detect/anomalydetector/v1.1/timeseries/entire/detect/vision/v3.2/analyze(control, same host)/text/analytics/v3.1/languages(control, same host)Controls on the same hosts still answer
401, which rules out key, region, networkand DNS problems — the API itself is gone. This is what breaks the
UnitTests anomalyCI job today: a 410 carries no response body, so the output struct decodesto
nulland the all-primitive, non-nullableADEntireResponse/ADLastResponseencoders throw
Null value appeared in non-nullable field: top level Product or row object.The six stages were already
@deprecatedin-repo pointing atIsolationForest.Microsoft's replacement is the open-source
microsoft/anomaly-detectorlibrary rather than a REST API, so there is nothing to migrate these stages onto.
This removes the components entirely, following the same approach as the Bing Search
v7 removal (#2494).
Changes
Code. Deletes
AnomalyDetection.scala,AnomalyDetectorSchemas.scala,MultivariateAnomalyDetection.scalaandMultivariateAnomalyDetectorSchemas.scala,covering
DetectAnomalies,DetectLastAnomaly,SimpleDetectAnomalies,SimpleFitMultivariateAnomaly,SimpleDetectMultivariateAnomalyandDetectLastMultivariateAnomaly. Nothing else in the repo referenced them. Thesynapse.ml.cognitive.anomalydeprecation shim is updated the same waybing.pywas.
Tests. Deletes
AnamolyDetectionSuite.scalaandMultivariateAnamolyDetectionSuite.scala(the latter was 340 lines of entirelycommented-out code), and removes every Anomaly Detector
FuzzingTestexemption —including the stale
services.DetectMultivariateAnomalyentry, which pointed at apre-reorg class path. Removes the now-unused
madTestFilebenchmark helper.CI and secrets. Removes the
anomalytest matrix entry frompipeline.yaml,the
Anomalyfeature name, and theAnomalyApiKeyandMADTestStorageKeysecrets.Drops the now-dead notebook exclusions from
DatabricksUtilitiesandSynapseTestsrather than leaving them behind.
Docs. Deletes
_AnomalyDetection.md,_MAD.mdandestimators_cognitive.md(which contained nothing but the MAD entry), the Multivariate Anomaly Detection and
Predictive Maintenance notebooks, and the anomaly cells in the AI Services overview
notebook. Updates
transformers_cognitive.md,sidebars.js,docusaurus.config.jsand the docgen manifest. Redirects that pointed at thedeleted pages now point at the Isolation Forests quickstart, so existing inbound
links keep working instead of 404ing.
Bug fix this surfaced.
FormRecognizerV3calledlogClass(FeatureNames.AiServices.Anomaly)instead of.Form, so its telemetry wasbeing misattributed to Anomaly Detector. Fixed while removing the feature name.
Deliberately left alone: CyberML (
synapse.ml.cyber.anomaly), Isolation Forest, andthe generic "anomaly detection" capability wording in
README.md/docs/Overview.md— SynapseML still does anomaly detection, just not via this retired service.
Validation
Run locally against Scala 2.12.17 / Spark 3.5.0 on JDK 11:
compile+Test/compile, all modules — successscalastyle+Test/scalastyle, all modules — 0 errors, 0 warningsFuzzingTest— 10/10 passed, with the exemptions removed, confirming thestages are genuinely gone and no dangling fuzzer-coverage requirement remains
codegen— success; noservices/anomalywrappers are generatedRelated
Fixes the
UnitTests anomalyfailure seen in ADO build 229662289.