Expman Core
Core storage and logging engine for expman-rs.
Overview
The expman module provides the foundational components for tracking, storing, and managing experiment data with high performance. Its central design principle ensures that logging operations (e.g., log_vector()) are extremely fast (~100ns channel sends) and never block the main experiment process.
All I/O operations are handled asynchronously via a background tokio task.
Key Features
- Asynchronous Logging: Uses a tokio background task and mpsc channels to offload I/O operations, ensuring the main application thread is never blocked.
- Efficient Storage: Writes metrics using Apache Arrow and Parquet formats in batches, rather than inefficient per-step read-append-write cycles.
- Strong Typing: Provides robust data models for experiment configurations, run states, and metric values.
Usage Example
Below is a basic example of how to use expman directly in a Rust application to track an experiment:
use ;
Architecture Map
ExperimentConfig: Configures the base directory, experiment name, flush intervals, and environment metadata.LoggingEngine: The main entry point. It manages the background writer task and exposes non-blocking methods to send data.models: Contains definitions forRunStatus,MetricValue(which supports Floats, Ints, Bools, and Strings), andMetricRow.storage: Internal module that handles the actual file I/O, writingconfig.yaml,run.yaml,run.log, andvectors.parquet.