[rllib] rename async -> _async (#2097)

async and await are reserved words in Python 3.7, and will give a syntax error.
This commit is contained in:
Alok Singh 2018-05-19 14:16:52 -07:00 committed by Robert Nishihara
parent eba73449cc
commit 8e0962bb9c
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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(