oa::ItRolloutTraining

Coordinates the two-phase lifecycle of synchronous on-policy training. Environment stepping, policy evaluation, and loss construction remain caller supplied; an owned `ItTraining` controls each exact optimizer update.

Public Methods

oa::Status oa::ItRolloutTraining::abortRollout(RolloutBuffer & inRollout)
oa::Status oa::ItRolloutTraining::beginRollout(RolloutBuffer & inRollout)
bool oa::ItRolloutTraining::beginUpdate()
const ItRolloutTrainingConfig & oa::ItRolloutTraining::config()
oa::Status oa::ItRolloutTraining::finalizeRollout(RolloutBuffer & inRollout, const GaeConfig & inConfig = {})
oa::Status oa::ItRolloutTraining::finish()
bool oa::ItRolloutTraining::isDone()
bool oa::ItRolloutTraining::isValid()
const oa::Status & oa::ItRolloutTraining::lastStatus()
oa::Status oa::ItRolloutTraining::nextUpdate(const oa::Matrix & inLoss)
RolloutTrainingPhase oa::ItRolloutTraining::phase()
oa::U32 oa::ItRolloutTraining::rolloutIndex()
oa::U32 oa::ItRolloutTraining::updateEpoch()
const oa::ItTraining & oa::ItRolloutTraining::updateLoop()
oa::ItTraining & oa::ItRolloutTraining::updateLoop()

Constructor & Destructor Documentation

oa::ItRolloutTraining::ItRolloutTraining( oa::Engine & inEngine, oa::Optimizer & inOptimizer, const ItRolloutTrainingConfig & inConfig )
No public source comment is attached to this declaration.

Parameters

inEngine
oa::Engine &

inOptimizer
oa::Optimizer &

inConfig
const ItRolloutTrainingConfig &

Public Method Documentation

oa::Status oa::ItRolloutTraining::abortRollout( RolloutBuffer & inRollout )
Restores the pre-beginRollout collect state after the caller cancels the unsubmitted command transaction. This is also valid after finalizeRollout and before the first update begins.

Parameters

inRollout
RolloutBuffer &

Returns

oa::Status

The declared return value.

oa::Status oa::ItRolloutTraining::beginRollout( RolloutBuffer & inRollout )
Starts one collection cycle and resets the supplied fixed-capacity buffer.

Parameters

inRollout
RolloutBuffer &

Returns

oa::Status

The declared return value.

bool oa::ItRolloutTraining::beginUpdate()
Must be called immediately before recording one differentiable PPO update. It advances the underlying ItTraining lifecycle and returns false only on invalid phase/configuration or after completion.

Returns

bool

The declared return value.

const ItRolloutTrainingConfig & oa::ItRolloutTraining::config()
No public source comment is attached to this declaration.

Returns

const ItRolloutTrainingConfig &

The declared return value.

oa::Status oa::ItRolloutTraining::finalizeRollout( RolloutBuffer & inRollout, const GaeConfig & inConfig = {} )
Requires a full buffer, records GAE, and opens the update phase.

Parameters

inRollout
RolloutBuffer &

inConfig
const GaeConfig &

Default: {}

Returns

oa::Status

The declared return value.

oa::Status oa::ItRolloutTraining::finish()
No public source comment is attached to this declaration.

Returns

oa::Status

The declared return value.

bool oa::ItRolloutTraining::isDone()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

bool oa::ItRolloutTraining::isValid()
No public source comment is attached to this declaration.

Returns

bool

The declared return value.

const oa::Status & oa::ItRolloutTraining::lastStatus()
No public source comment is attached to this declaration.

Returns

const oa::Status &

The declared return value.

oa::Status oa::ItRolloutTraining::nextUpdate( const oa::Matrix & inLoss )
Completes the update recorded after beginUpdate: optimizer, submit, sync, metrics and phase advancement.

Parameters

inLoss
const oa::Matrix &

Returns

oa::Status

The declared return value.

RolloutTrainingPhase oa::ItRolloutTraining::phase()
No public source comment is attached to this declaration.

Returns

RolloutTrainingPhase

The declared return value.

oa::U32 oa::ItRolloutTraining::rolloutIndex()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

oa::U32 oa::ItRolloutTraining::updateEpoch()
No public source comment is attached to this declaration.

Returns

oa::U32

The declared return value.

const oa::ItTraining & oa::ItRolloutTraining::updateLoop()
No public source comment is attached to this declaration.

Returns

const oa::ItTraining &

The declared return value.

oa::ItTraining & oa::ItRolloutTraining::updateLoop()
No public source comment is attached to this declaration.

Returns

oa::ItTraining &

The declared return value.