batuta/experiment/mod.rs
1#![allow(dead_code, unused_imports)]
2//! Experiment Tracking Integration Module
3//!
4//! Integrates with Entrenar Experiment Tracking Spec v1.8.0 for orchestrating
5//! ML experiment workflows with full traceability, cost optimization, and
6//! academic research support.
7//!
8//! # Entrenar CLI (v0.2.4)
9//!
10//! The entrenar crate provides a comprehensive CLI:
11//!
12//! ```bash
13//! # Training (YAML Mode v1.0)
14//! entrenar train config.yaml # Train from declarative YAML
15//! entrenar validate config.yaml # Validate configuration
16//! entrenar init --template lora # Generate config template
17//!
18//! # Model Operations
19//! entrenar quantize model.safetensors --bits 4
20//! entrenar merge model1.st model2.st --method ties
21//!
22//! # Research Workflows
23//! entrenar research init --id my-dataset
24//! entrenar research cite artifact.yaml --format bibtex
25//!
26//! # Inspection & Auditing
27//! entrenar inspect model.safetensors # Model/data inspection
28//! entrenar audit data.parquet --type bias
29//! entrenar monitor data.parquet # Drift detection
30//!
31//! # Benchmarking (entrenar-bench)
32//! entrenar-bench temperature --start 1.0 --end 8.0
33//! entrenar-bench cost-performance --gpu a100-80gb
34//! ```
35//!
36//! # MCP Tooling (pmcp v2.3)
37//!
38//! The stack uses PAIML's pmcp SDK (github.com/paiml/rust-mcp-sdk) for both
39//! Model Context Protocol client and server roles — full TypeScript SDK parity
40//! covering JSON-RPC framing, stdio/SSE/WebSocket transports, tool registration,
41//! and session lifecycle.
42//!
43//! # Features
44//! - ComputeDevice abstraction (CPU/GPU/TPU/AppleSilicon)
45//! - EnergyMetrics and CostMetrics for efficiency tracking
46//! - ModelParadigm classification
47//! - CostPerformanceBenchmark with Pareto frontier analysis
48//! - SovereignDistribution for air-gapped deployments
49//! - ResearchArtifact with ORCID/CRediT academic support
50//! - CitationMetadata for BibTeX/CFF generation
51//! - Experiment tree visualization for run comparison (MLflow replacement)
52//! - YAML Mode Training v1.0 declarative configuration
53
54// Submodules
55pub mod benchmark;
56pub mod metrics;
57pub mod research;
58pub mod run;
59pub mod sovereign;
60pub mod tree;
61pub mod types;
62
63#[cfg(test)]
64mod tests;
65
66// Re-export all public types from submodules for convenient access
67
68// Types module
69pub use types::{
70 AppleChip, ComputeDevice, ComputeIntensity, CpuArchitecture, ExperimentError, GpuVendor,
71 ModelParadigm, PlatformEfficiency, TpuVersion,
72};
73
74// Metrics module
75pub use metrics::{CostMetrics, EnergyMetrics};
76
77// Benchmark module
78pub use benchmark::{CostPerformanceBenchmark, CostPerformancePoint};
79
80// Research module
81pub use research::{
82 CitationMetadata, CitationType, CreditRole, Orcid, PreRegistration, ResearchArtifact,
83 ResearchContributor,
84};
85
86// Run module
87pub use run::{ExperimentRun, ExperimentStorage, InMemoryExperimentStorage, RunStatus};
88
89// Sovereign module
90pub use sovereign::{
91 ArtifactSignature, ArtifactType, OfflineRegistryConfig, SignatureAlgorithm, SovereignArtifact,
92 SovereignDistribution,
93};