Skip to main content

Crate rlmesh_runtime

Crate rlmesh_runtime 

Source
Expand description

RLMesh single-session runtime driver.

Shared reset -> predict -> step semantics for one ready model/environment session. Scheduling, endpoint pools, route fan-out, and cluster lifecycle live elsewhere.

Re-exports§

pub use hooks::ActionReceivedEvent;
pub use hooks::EnvConnectedEvent;
pub use hooks::EpisodeCompletedEvent;
pub use hooks::EpisodeStartedEvent;
pub use hooks::HookError;
pub use hooks::Leg;
pub use hooks::LogEvent;
pub use hooks::LogLevel;
pub use hooks::ModelConnectedEvent;
pub use hooks::NoopRuntimeHooks;
pub use hooks::ObservationEmittedEvent;
pub use hooks::PayloadFacts;
pub use hooks::RefusingRelayPolicy;
pub use hooks::RelayAdvisoryEvent;
pub use hooks::RelayDecision;
pub use hooks::RelayPolicy;
pub use hooks::RuntimeEnvContext;
pub use hooks::RuntimeHooks;
pub use hooks::SessionEndedEvent;
pub use hooks::SessionFailedEvent;
pub use hooks::SessionStartedEvent;
pub use hooks::StepCompletedEvent;
pub use hooks::TelemetrySnapshotEvent;
pub use spec::ENV_RESET_OPTIONS_KEY;
pub use spec::PeerCeiling;
pub use spec::RuntimeLimits;
pub use spec::RuntimeReport;
pub use spec::RuntimeSessionSpec;
pub use spec::TRIAL_INDEX_OPTION;
pub use spec::declares_reset_option;
pub use spec::reset_options_for;
pub use rlmesh_proto;

Modules§

hooks
Runtime hook events and the observer trait the driver fans them out to.
spec
The runtime session spec, its limits, and the report a finished run returns.
telemetry
Telemetry — windowed/session aggregation of per-op metrics.

Structs§

Advisory
One non-fatal note raised at join, resolve, or plan derivation.
EagerScheduler
The default policy: predict for every waiting group right away. Groups that become ready while the model is busy form the next batch.
EndpointPhases
The endpoint-local split of JoinResponse.endpoint_total_ns (ns), plus the pre-handler wait and slot depth a pipelining model endpoint reports.
RuntimeDriver
Drives one ready model/env session through its reset -> predict -> step loop. Inert until a run* method is awaited.
RuntimeEnvReset
The env’s reset reply plus the endpoint-local op duration the peer stamped.
RuntimeEnvStep
The env’s step reply plus the endpoint-local op duration the peer stamped.
RuntimeModelPrediction
The model’s predict reply plus the endpoint-local op duration the peer stamped.

Enums§

AdvisorySeverity
How much an advisory should worry an automated consumer.
DType
Element data type for tensor values exchanged across the wire.
RuntimeError

Traits§

PredictScheduler
Decides which groups waiting for a prediction go out next (as one grouped predict for a model that fuses them, one predict each otherwise). Consulted whenever at least one group is waiting and the model can take more; busy is how many groups are still stepping or resetting. An empty plan waits for the next event (a step or reset completing) — the driver forces a full plan when nothing else is in flight, so a scheduler cannot stall the route.
RuntimeEnv
The environment side of a route: reset and step over the wire, plus close.
RuntimeModel
The model side of a route: predict, plus the per-episode adapter-state lifecycle (evict on episode end, release at session end).