Skip to main content

Predict infrastructure failure states from a stream of metrics

Project description

scry

CI PyPI Python License

Scry predicts infrastructure failure states from a stream of metrics. It sorts each resource into one of five operational states, recommends an action for each, and forecasts where the metrics are headed. It is data-source agnostic and runs offline. You bring your own metrics, train your own model, and serve predictions over a small HTTP API. No trained weights ship.

LogicMonitor is one supported adapter, not the anchor. The default path reads Parquet or CSV from local files or object storage. Everything normalizes to one canonical long-format table, so any metric source works once it is in that shape.

The X-DEC modelA dual-encoder temporal VAE plus deep embedded clustering, pure PyTorch, no cloud dependencies. Trains on your own windowed metrics from scratch.
Five operational statesEvery resource is sorted into NORMAL, PRE_SCALE, PRE_FAILURE, ACTIVE_DEGRADATION, or ANOMALY, each mapped to a recommended action and priority.
ForecastingAn optional Chronos layer (scryml[forecast]) projects where each metric is headed across multiple horizons, kept behind an extra so the core stays offline-capable.
Data-source agnosticRead Parquet or CSV from local disk or object storage (S3, GCS, ADLS, MinIO) through DuckDB. The LogicMonitor adapter lives behind scryml[logicmonitor].
A small HTTP serviceFastAPI endpoints for prediction, forecasting, drift, anomaly, and accuracy: /predict, /predict/lookup, /forecast, /drift, /anomaly, /accuracy.
Bring your own dataOne canonical schema: resource, metric, timestamp, value, plus optional host and datasource fields. Drop your metrics into that table and train. No real telemetry or weights are included.

Install

pip install scryml                  # core: the model and the API
pip install "scryml[forecast]"      # add Chronos forecasting
pip install "scryml[logicmonitor]"  # add the LogicMonitor adapter

Or from source with every extra:

git clone https://github.com/ryanmat/scry && cd scry
uv sync --all-extras

Quickstart

End to end on the bundled synthetic sample, no cloud:

# extract windowed features (the sample is dated 2026-01-01)
python scripts/extract_features.py --data examples/sample_data/metrics.parquet \
  --start 2026-01-01 --end 2026-01-02 --profile kubernetes \
  --output data/training_data.npz

# train a model, then serve it
python scripts/train_model.py --data data/training_data.npz --output models/xdec_model.pt
MODEL_PATH=models/xdec_model.pt uvicorn scry.api.main:app --port 8000
curl localhost:8000/health
curl localhost:8000/clusters

Full walkthrough, including a /predict call: examples/quickstart.md.

Documentation

  • Architecture: the model, the data seam, and how the pieces fit together.
  • Data contract: the canonical metric schema and the ingestion API.
  • Ingestion: object storage and the LogicMonitor adapter.
  • Training: training locally or on your own orchestrator.

Built with uv, ruff, and pytest on Python 3.10 and up.

License

Apache-2.0.

WAKE UP TO FIND OUT THAT YOU ARE THE EYES OF THE WORLD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scryml-0.1.0.tar.gz (441.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scryml-0.1.0-py3-none-any.whl (76.0 kB view details)

Uploaded Python 3

File details

Details for the file scryml-0.1.0.tar.gz.

File metadata

  • Download URL: scryml-0.1.0.tar.gz
  • Upload date:
  • Size: 441.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scryml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d139e18bd2b743e7b9479c860a21b3bb8cd0614f66758faa4c86d04dbb9d1bd1
MD5 5fd13bb5d6252b4d54f4f161628222d1
BLAKE2b-256 8eb8a0b9b1644e2a144929a06edac97f5de79ff181938f690622159da0103cd9

See more details on using hashes here.

File details

Details for the file scryml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scryml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 76.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scryml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1356b0d52d701091dce4acbfce2e20a71ec42d8c1a7f9308d314f86e35be21eb
MD5 3f124ef9104eea376cd4f46ba519f5aa
BLAKE2b-256 74e36858e75d40f51570caf1631a4fcf571b51194258f27ac6e4ababb0440772

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page