When a simulator (environment) is available,
InputReader - are used to collect and return experiences from the envs.
For more details on
InputReader used for offline RL (e.g. reading files of
pre-recorded data), see the offline RL API reference here.
The base sampler API (SamplerInput) is defined as follows:
Base Sampler class (ray.rllib.evaluation.sampler.SamplerInput)#
The synchronous sampler starts stepping through and collecting samples from an
environment only when its
next() method is called. Calling this method blocks
SampleBatch has been built and is returned.
The asynchronous sampler has a separate thread that keeps stepping through and
collecting samples from an environment in the background. Calling its
gets the next enqueued
SampleBatch from a queue and returns it immediately.