ray.rllib.evaluation.sampler.AsyncSampler
ray.rllib.evaluation.sampler.AsyncSampler#
- class ray.rllib.evaluation.sampler.AsyncSampler(*, worker: RolloutWorker, env: ray.rllib.env.base_env.BaseEnv, clip_rewards: Union[bool, float], rollout_fragment_length: int, count_steps_by: str = 'env_steps', callbacks: DefaultCallbacks, multiple_episodes_in_batch: bool = False, normalize_actions: bool = True, clip_actions: bool = False, observation_fn: Optional[ObservationFunction] = None, sample_collector_class: Optional[Type[ray.rllib.evaluation.collectors.sample_collector.SampleCollector]] = None, render: bool = False, blackhole_outputs: bool = False, policies=None, policy_mapping_fn=None, preprocessors=None, obs_filters=None, tf_sess=None, no_done_at_end=- 1, horizon=- 1, soft_horizon=- 1)[source]#
Bases:
threading.Thread
,ray.rllib.evaluation.sampler.SamplerInput
Async SamplerInput that collects experiences in thread and queues them.
Once started, experiences are continuously collected in the background and put into a Queue, from where they can be unqueued by the caller of
get_data()
.Methods
Initializes an AsyncSampler instance.
Return a string used for identification purposes only.
Return whether this thread is a daemon.
Return whether the thread is alive.
Wait until the thread terminates.
Set whether this thread is a daemon.
Set the name string for this thread.
Start the thread's activity.
Returns TensorFlow queue ops for reading inputs from this reader.
Attributes
A boolean value indicating whether this thread is a daemon thread.
Thread identifier of this thread or None if it has not been started.
A string used for identification purposes only.
Native integral thread ID of this thread, or None if it has not been started.