Skip to main content

Crate r2l_sampler

Crate r2l_sampler 

Source
Expand description

Rollout samplers for r2l on-policy algorithms.

DirectSampler lets workers write directly to trajectory buffers, while StagedSampler receives transitions from workers and can transform them before writing them. Both support single-threaded and multi-threaded environment workers.

Structs§

DirectSampler
Rollout sampler whose workers write directly to output buffers.
DirectSamplerCore
Mutable direct-sampler state exposed to DirectSamplerHook implementations.
StagedSampler
Observation-normalizing rollout sampler controlled by a hook.
StagedSamplerCore
Mutable staged-sampler state exposed to hook implementations.

Enums§

RolloutMode
Bound used for one rollout collection request per environment.
SamplerExecutionMode
Execution strategy used by the sampler.
SamplerHookResult
Instruction returned by a DirectSamplerHook during rollout collection.

Traits§

DirectSamplerHook
Hook that controls the sequence of collection bounds for a raw sampler.
StagedSamplerHook
Hook that controls the sequence of collection bounds for a staged sampler.