ray.rllib.evaluation.sampler.SyncSampler#

class ray.rllib.evaluation.sampler.SyncSampler(*, worker: RolloutWorker, env: BaseEnv, clip_rewards: 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: ObservationFunction | None = None, sample_collector_class: Type[SampleCollector] | None = None, render: bool = False, policies=None, policy_mapping_fn=None, preprocessors=None, obs_filters=None, tf_sess=None, horizon=-1, soft_horizon=-1, no_done_at_end=-1)[源代码]#

基类:SamplerInput

同步采样器输入,当调用 get_data() 时收集经验。

方法

__init__

初始化一个 SyncSampler 实例。

tf_input_ops

返回用于从此读取器读取输入的 TensorFlow 队列操作。