tracel 0.11.0

High-level Tracel SDK
Documentation
// #![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs)]

//! # Tracel SDK
//!
//! High-level Tracel SDK.
//!
//! This crate re-exports the main crates used to build training, experiment tracking, inference,
//! and fleet workflows on top of Tracel.
//!
//! Features:
//! - Artifact creation and management
//! - Experiment tracking
//! - Logging metrics
//! - Model versioning
//!
//! ## Crate Layout
//!
//! The most commonly used re-exports are:
//! - [`experiment`]: experiment runs, logging, artifacts, and Burn learner integrations.
//! - [`app`]: job registration, plus CLI and HTTP server front-ends to run those jobs.
//! - [`console`]: organizations, projects, and users on the Tracel console.
//! - [`datasets`]: the dataset domain and the capability over it.
//! - [`models`]: the model domain and the capability over it.
//! - [`artifact`]: bundle and artifact utilities.
//!
//! ## Registering Routines
//!
//! Wrap a routine into a job with [`experiment::ExperimentModule::create`], then register it
//! with a [`app::cli::Cli`] (to dispatch from the command line) or a `app::server::Server`
//! (to dispatch over HTTP, requires the `server` feature):
//!
//! ```ignore
//! use tracel::app::cli::Cli;
//! use tracel::app::cli::mapper::JsonMapper;
//! use tracel::experiment::ExperimentRun;
//! use tracel::{Connection, Context};
//!
//! fn main() -> anyhow::Result<()> {
//!     let module = Context::new(Connection::Cloud)?.experiment();
//!
//!     let job = module.create("my_training_procedure", |session: &ExperimentRun, config| {
//!         // Your training code here
//!         my_training_function(session, config)
//!     });
//!
//!     Cli::new()
//!         .register(job, JsonMapper::with_default(MyConfig::default()))
//!         .run()?;
//!
//!     Ok(())
//! }
//! ```
//!
//! The job's name (`"my_training_procedure"` above) is what callers use to select it, whether
//! from the CLI or from an HTTP request path.

/// Experiment tracking and management.
pub mod experiment {
    pub use tracel_core::experiment::*;
    #[doc(inline)]
    pub use tracel_experiment::*;
}

/// The Tracel console: its organizations, projects, and users.
#[doc(inline)]
pub use tracel_console as console;

/// A Tracel Station: experiments, models, and datasets served by one Station URL (requires the
/// `station` feature).
#[cfg(feature = "station")]
#[doc(inline)]
pub use tracel_station as station;

/// The dataset domain the console or a Station serves, and the operations over it.
#[doc(inline)]
pub use tracel_datasets as datasets;

/// The model domain the console or a Station serves, and the operations over it.
#[doc(inline)]
pub use tracel_models as models;

/// Inference contracts and adapters.
#[doc(hidden)]
#[doc(inline)]
pub use tracel_inference as inference;

/// Artifact bundle utilities and adapters.
#[doc(inline)]
pub use tracel_artifact as artifact;

/// App module for job registration, CLI, and config mappers
#[doc(inline)]
pub use tracel_app as app;

/// Station runner front-end: serve registered jobs to a Tracel Station job queue (requires the
/// `runner` feature).
#[cfg(feature = "runner")]
#[doc(inline)]
pub use tracel_runner as runner;

pub use tracel_core::Connection;
pub use tracel_core::Context;
pub use tracel_core::ContextError;