diff --git a/python/ray/rllib/a3c/a3c_evaluator.py b/python/ray/rllib/a3c/a3c_evaluator.py index 9b0522dfd..74d201016 100644 --- a/python/ray/rllib/a3c/a3c_evaluator.py +++ b/python/ray/rllib/a3c/a3c_evaluator.py @@ -45,7 +45,7 @@ class A3CEvaluator(PolicyEvaluator): "rew_filter": self.rew_filter} self.sampler = AsyncSampler(env, self.policy, self.obs_filter, config["batch_size"]) - if start_sampler and self.sampler.async: + if start_sampler and self.sampler._async: self.sampler.start() self.logdir = logdir diff --git a/python/ray/rllib/utils/sampler.py b/python/ray/rllib/utils/sampler.py index 8adc99605..242464dbf 100644 --- a/python/ray/rllib/utils/sampler.py +++ b/python/ray/rllib/utils/sampler.py @@ -90,7 +90,7 @@ class SyncSampler(object): This class provides data on invocation, rather than on a separate thread.""" - async = False + _async = False def __init__(self, env, policy, obs_filter, num_local_steps, horizon=None): self.num_local_steps = num_local_steps @@ -126,7 +126,7 @@ class AsyncSampler(threading.Thread): Note that batch_size is only a unit of measure here. Batches can accumulate and the gradient can be calculated on up to 5 batches.""" - async = True + _async = True def __init__(self, env, policy, obs_filter, num_local_steps, horizon=None): assert getattr(