Expand description
Pacha: Model, Data and Recipe Registry
Pacha provides a unified registry for machine learning artifacts—models, datasets, and training recipes—with full lineage tracking, semantic versioning, and cryptographic integrity.
§Quick Start
use pacha::prelude::*;
// Open or create the registry
let registry = Registry::open_default()?;
// Register a model
let model_data = std::fs::read("model.apr")?;
let card = ModelCard::builder()
.description("Fraud detection model")
.metrics([("auc", 0.95), ("f1", 0.88)])
.build();
registry.register_model(
"fraud-detector",
&ModelVersion::new(1, 0, 0),
&model_data,
card,
)?;
// Retrieve the model
let model = registry.get_model("fraud-detector", &ModelVersion::new(1, 0, 0))?;
println!("Model stage: {}", model.stage);§Architecture
Pacha consists of three main registries:
- Model Registry -
.aprformat files with metadata, metrics, and lineage - Data Registry -
.aldformat files with schema and provenance - Recipe Registry - TOML configs with hyperparameters and environment specs
§Storage
Pacha uses content-addressed storage with BLAKE3 hashing for:
- Deduplication across versions
- Tamper detection
- Efficient delta storage
Registry metadata is stored in SQLite at ~/.pacha/registry.db.
Re-exports§
pub use error::PachaError;pub use error::Result;pub use registry::Registry;pub use registry::RegistryConfig;pub use registry::StorageStats;
Modules§
- aliases
- Model Aliases and Shortcuts
- cache
- Cache Management and Download Progress
- catalog
- Model Catalog and Discovery
- cli
- CLI command handlers.
- crypto
- Encryption at rest for model files (spec §3.3)
- data
- Data registry types and operations.
- error
- Error types for Pacha registry operations.
- experiment
- Experiment tracking for training runs.
- fetcher
- Unified Model Fetcher
- format
- Model Format Detection and Metadata
- lineage
- Model lineage tracking.
- manifest
- Model Manifest (Modelfile) Support
- model
- Model registry types and operations.
- prelude
- Convenient re-exports for common usage.
- recipe
- Recipe registry types and operations.
- registry
- Registry implementation with
SQLitestorage. - remote
- Remote registry client for Pacha
- resolver
- URI resolver for model references
- signing
- Model Signing and Verification
- storage
- Content-addressed storage for Pacha artifacts.
- uri
- URI scheme for model references