Skip to content

Add save/load methods to anomaly detection classes#3130

Open
robrui wants to merge 1 commit into
unit8co:masterfrom
robrui:feature/3051-anomaly-save-load
Open

Add save/load methods to anomaly detection classes#3130
robrui wants to merge 1 commit into
unit8co:masterfrom
robrui:feature/3051-anomaly-save-load

Conversation

@robrui

@robrui robrui commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #3051.

Summary

Adds save() and load() methods to the four anomaly detection base classes (AnomalyScorer, Detector, Aggregator, AnomalyModel). This makes it possible to persist trained scorers like KMeansScorer, detectors like QuantileDetector, aggregators, and anomaly models to disk and reload them later without retraining. Uses the same pickle-based approach as ForecastingModel.save/load.

Other Information

All subclasses inherit save/load automatically. The full anomaly detection test suite passes (229 tests).

@robrui robrui requested a review from dennisbader as a code owner June 4, 2026 01:12
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.

Add save() and load() methods toKMeansScorer

1 participant