garage.sampler.worker module¶
Worker interface used in all Samplers.
-
class
Worker
(*, seed, max_path_length, worker_number)[source]¶ Bases:
abc.ABC
Worker class used in all Samplers.
-
collect_rollout
()[source]¶ Collect the current rollout, clearing the internal buffer.
Returns: - Batch of sampled trajectories. May be
- truncated if the rollouts haven’t completed yet.
Return type: garage.TrajectoryBatch
-
rollout
()[source]¶ Sample a single rollout of the agent in the environment.
Returns: - Batch of sampled trajectories. May be
- truncated if max_path_length is set.
Return type: garage.TrajectoryBatch
-
step_rollout
()[source]¶ Take a single time-step in the current rollout.
Returns: True iff the path is done, either due to the environment indicating termination of due to reaching max_path_length.
-