Skip to main content

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 v1.8.6 + pforge v0.1.4)
37//!
38//! The stack includes Model Context Protocol (MCP) infrastructure:
39//!
40//! ```bash
41//! # pmcp - Rust SDK for MCP servers/clients
42//! # Build MCP servers with full TypeScript SDK compatibility
43//!
44//! # pforge - Declarative MCP framework
45//! pforge new my-server              # Create new MCP server project
46//! pforge serve                       # Run MCP server
47//!
48//! # Define tools in YAML (pforge.yaml):
49//! # tools:
50//! #   - type: native
51//! #     name: train_model
52//! #     handler: { path: handlers::train }
53//! #     params:
54//! #       config: { type: string, required: true }
55//! ```
56//!
57//! **Handler Types:**
58//! - `native` - Rust functions with full type safety
59//! - `cli` - Execute shell commands
60//! - `http` - Proxy HTTP endpoints
61//! - `pipeline` - Chain multiple tools together
62//!
63//! # Features
64//! - ComputeDevice abstraction (CPU/GPU/TPU/AppleSilicon)
65//! - EnergyMetrics and CostMetrics for efficiency tracking
66//! - ModelParadigm classification
67//! - CostPerformanceBenchmark with Pareto frontier analysis
68//! - SovereignDistribution for air-gapped deployments
69//! - ResearchArtifact with ORCID/CRediT academic support
70//! - CitationMetadata for BibTeX/CFF generation
71//! - Experiment tree visualization for run comparison (MLflow replacement)
72//! - YAML Mode Training v1.0 declarative configuration
73
74// Submodules
75pub mod benchmark;
76pub mod metrics;
77pub mod research;
78pub mod run;
79pub mod sovereign;
80pub mod tree;
81pub mod types;
82
83#[cfg(test)]
84mod tests;
85
86// Re-export all public types from submodules for convenient access
87
88// Types module
89pub use types::{
90    AppleChip, ComputeDevice, ComputeIntensity, CpuArchitecture, ExperimentError, GpuVendor,
91    ModelParadigm, PlatformEfficiency, TpuVersion,
92};
93
94// Metrics module
95pub use metrics::{CostMetrics, EnergyMetrics};
96
97// Benchmark module
98pub use benchmark::{CostPerformanceBenchmark, CostPerformancePoint};
99
100// Research module
101pub use research::{
102    CitationMetadata, CitationType, CreditRole, Orcid, PreRegistration, ResearchArtifact,
103    ResearchContributor,
104};
105
106// Run module
107pub use run::{ExperimentRun, ExperimentStorage, InMemoryExperimentStorage, RunStatus};
108
109// Sovereign module
110pub use sovereign::{
111    ArtifactSignature, ArtifactType, OfflineRegistryConfig, SignatureAlgorithm, SovereignArtifact,
112    SovereignDistribution,
113};