Predict infrastructure failure states from a stream of metrics
Project description
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 model | A dual-encoder temporal VAE plus deep embedded clustering, pure PyTorch, no cloud dependencies. Trains on your own windowed metrics from scratch. |
| Five operational states | Every resource is sorted into NORMAL, PRE_SCALE, PRE_FAILURE, ACTIVE_DEGRADATION, or ANOMALY, each mapped to a recommended action and priority. |
| Forecasting | An 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 agnostic | Read 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 service | FastAPI endpoints for prediction, forecasting, drift, anomaly, and accuracy: /predict, /predict/lookup, /forecast, /drift, /anomaly, /accuracy. |
| Bring your own data | One 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d139e18bd2b743e7b9479c860a21b3bb8cd0614f66758faa4c86d04dbb9d1bd1
|
|
| MD5 |
5fd13bb5d6252b4d54f4f161628222d1
|
|
| BLAKE2b-256 |
8eb8a0b9b1644e2a144929a06edac97f5de79ff181938f690622159da0103cd9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1356b0d52d701091dce4acbfce2e20a71ec42d8c1a7f9308d314f86e35be21eb
|
|
| MD5 |
3f124ef9104eea376cd4f46ba519f5aa
|
|
| BLAKE2b-256 |
74e36858e75d40f51570caf1631a4fcf571b51194258f27ac6e4ababb0440772
|