Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub trait Learner:
Send
+ Sync
+ 'static {
// Required method
fn process_run<'a>(
&'a self,
run: &'a RunRecord,
backend: &'a dyn StorageBackendDyn,
hot_cache: &'a Arc<RwLock<HotCache>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
}

Referenced types: Send, Sync, RunRecord, StorageBackendDyn, Arc, RwLock, HotCache, Pin, Box, Future, Result, ()

Background learner that updates adaptive state from observed runs.

Required Methods

process_run

fn process_run<'a>(
&'a self,
run: &'a RunRecord,
backend: &'a dyn StorageBackendDyn,
hot_cache: &'a Arc<RwLock<HotCache>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

Referenced types: RunRecord, StorageBackendDyn, Arc, RwLock, HotCache, Pin, Box, Future, Result, (), Send

Process one observed run and update backend state plus the hot cache.

Parameters
  • run: Telemetry record to learn from.
  • backend: Storage backend used to persist learner state.
  • hot_cache: Shared in-memory cache to refresh with the latest results.
Returns

A future that resolves when the learner has finished processing the run.

Implementors

impl Learner for AcgLearner

impl Learner for AcgLearner

Referenced types: Learner, AcgLearner

impl Learner for ToolParallelismLearner

impl Learner for ToolParallelismLearner

Referenced types: Learner, ToolParallelismLearner

impl Learner for LatencySensitivityLearner

impl Learner for LatencySensitivityLearner

Referenced types: Learner, LatencySensitivityLearner