Catalog PyPI
PACKAGE EXPLORERView in registry

adaptive-profiler

PyPI

AutoML anomaly detection and schema-driven data quality for ETL pipelines

anomalyautomldatadetectionetlprofilingquality
Versions collected1
Direct dependencies9From release 0.2.0
Last observed20 Oct, 19:07 UTC

README

Version 0.2.0 documentation

adaptive_profiler

AutoML anomaly detection and schema-driven data quality checks for ETL pipelines.

Detects semantic anomalies that rule-based checks miss — stuck sensors, silent feeds, values that are numerically valid but statistically unusual. Each column gets its own model, trained on recent data, configured through a single YAML file.

Features

  • Two-layer quality checking — rule-based data contract checks + ML-based anomaly detection, both declared in one YAML file
  • AutoML via Optuna — searches over IForest, LOF, HBOS, COPOD, and ECOD; selects the best model per column automatically
  • Per-source isolation — each (partition × column) pair trains its own model; amsterdam and london never share a model
  • Configurable training window — train on the N most-recent rows rather than the full history to keep retraining fast
  • Manual model override — pin a specific algorithm and hyperparameters per column to skip Optuna entirely
  • Tunable flag threshold — override the binary flagging threshold per column on a validation split without retraining
  • Built-in cost projection — ScalingBenchmark fits T(n,m,k) = α·n^β·m^δ·k^γ so you can predict overhead before committing to production
  • Pipeline-safe output — failures reported in the output DataFrame, never raised as exceptions

Install

pip install adaptive-profiler
pip install "adaptive-profiler[s3]"   # include boto3 for S3 storage

For development (from source):

git clone https://github.com/kooroshkz/adaptive-profiler
cd adaptive-profiler
pip install -e ".[dev]"

Quick start

from adaptive_profiler import Profiler

profiler = Profiler.from_yaml("profiling_schema.yml")

# Train models — one per (city, column) pair
results = profiler.train(partition_key="amsterdam", df=historical_df)
for r in results:
    print(r)

# Score incoming data — returns long-format DataFrame
predictions = profiler.score(partition_key="amsterdam", df=new_df)
print(predictions[predictions["automl_flag"] == 1])

# Rule-based checks only
violations = profiler.check_quality(df=new_df)

Cost projection

from adaptive_profiler import ScalingBenchmark

bench = ScalingBenchmark(df, columns=["temperature_2m", "pressure"])
bench.run(quick=True)   # ~1–2 min
bench.fit()
print(bench.report(target_n=100_000, m=6, k=25))
t = bench.predict(n=100_000, m=6, k=25)

Running tests

pytest

Module layout

FilePurpose
profiler.pyMain Profiler class — train(), score(), check_quality()
schema.pyYAML config dataclasses — ProfilerConfig, ColumnConfig, TrainingConfig
trainer.pyOptuna HPO loop, manual override path, TrainingResult
models.pyPyOD model registry and Optuna search-space definitions
quality.pyRule-based quality checks, check_dataframe(), quality_summary()
store.pyS3Store, LocalStore, ArtifactStore protocol
projection.pyScalingBenchmark — benchmark, fit power-law, predict and report

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.028 May 20269

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
kooroshkz/adaptive-profiler

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f127082c41e2444047418c5d260fad472a9d3165495b74b33930ee8a7330389f