mirror of
https://github.com/wassname/ray.git
synced 2026-07-09 20:29:55 +08:00
[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:
committed by
Robert Nishihara
parent
eba73449cc
commit
8e0962bb9c
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user