Skip to content

chore: remove retired Azure AI Anomaly Detector components - #2605

Open
ranadeepsingh wants to merge 1 commit into
microsoft:masterfrom
ranadeepsingh:fix/retire-anomaly-detector
Open

chore: remove retired Azure AI Anomaly Detector components#2605
ranadeepsingh wants to merge 1 commit into
microsoft:masterfrom
ranadeepsingh:fix/retire-anomaly-detector

Conversation

@ranadeepsingh

@ranadeepsingh ranadeepsingh commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Azure AI Anomaly Detector service has been retired by Microsoft. Every
anomalydetector REST endpoint now answers HTTP 410 (Gone), verified from an
external host across paths, API versions and regions:

Region Path Status
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 410
westus2 /vision/v3.2/analyze (control, same host) 401
westus2 /text/analytics/v3.1/languages (control, same host) 401

Controls on the same hosts still answer 401, which rules out key, region, network
and DNS problems — the API itself is gone. This is what breaks the UnitTests anomaly CI job today: a 410 carries no response body, so the output struct decodes
to null and the all-primitive, non-nullable ADEntireResponse / ADLastResponse
encoders throw Null value appeared in non-nullable field: top level Product or row object.

The six 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 the components entirely, following the same approach as the Bing Search
v7 removal (#2494).

Changes

Code. Deletes AnomalyDetection.scala, AnomalyDetectorSchemas.scala,
MultivariateAnomalyDetection.scala and MultivariateAnomalyDetectorSchemas.scala,
covering DetectAnomalies, DetectLastAnomaly, SimpleDetectAnomalies,
SimpleFitMultivariateAnomaly, SimpleDetectMultivariateAnomaly and
DetectLastMultivariateAnomaly. Nothing else in the repo referenced them. The
synapse.ml.cognitive.anomaly deprecation shim is updated the same way bing.py
was.

Tests. Deletes AnamolyDetectionSuite.scala and
MultivariateAnamolyDetectionSuite.scala (the latter was 340 lines of entirely
commented-out code), and removes every Anomaly Detector FuzzingTest exemption —
including the stale services.DetectMultivariateAnomaly entry, which pointed at a
pre-reorg class path. Removes the now-unused madTestFile benchmark helper.

CI and secrets. Removes the anomaly test matrix entry from pipeline.yaml,
the Anomaly feature name, and the AnomalyApiKey and MADTestStorageKey secrets.
Drops the now-dead notebook exclusions from DatabricksUtilities and SynapseTests
rather than leaving them behind.

Docs. Deletes _AnomalyDetection.md, _MAD.md and estimators_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.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 instead of 404ing.

Bug fix this surfaced. FormRecognizerV3 called
logClass(FeatureNames.AiServices.Anomaly) instead of .Form, so its telemetry was
being misattributed to Anomaly Detector. Fixed while removing the feature name.

Deliberately left alone: CyberML (synapse.ml.cyber.anomaly), Isolation Forest, and
the 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 — success
  • scalastyle + Test/scalastyle, all modules — 0 errors, 0 warnings
  • FuzzingTest10/10 passed, with the exemptions removed, confirming the
    stages are genuinely gone and no dangling fuzzer-coverage requirement remains
  • codegen — success; no services/anomaly wrappers are generated

Related

Fixes the UnitTests anomaly failure seen in ADO build 229662289.

Copilot AI lite review requested due to automatic review settings August 4, 2026 23:33
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Hey @ranadeepsingh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

Copilot AI 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.

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 FLAKY for 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

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@ranadeepsingh
ranadeepsingh force-pushed the fix/retire-anomaly-detector branch from 26f79f0 to c67d0cc Compare August 5, 2026 00:00
@ranadeepsingh ranadeepsingh changed the title fix: retire Anomaly Detector stages after service shutdown (HTTP 410) chore: remove retired Azure AI Anomaly Detector components Aug 5, 2026
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
@ranadeepsingh
ranadeepsingh force-pushed the fix/retire-anomaly-detector branch from c67d0cc to 9478318 Compare August 5, 2026 00:02
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@codecov-commenter

codecov-commenter commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.93%. Comparing base (04897ba) to head (9478318).

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.
📢 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants