[rllib] Fix impala stress test (#5101)

* add copy

* upgrade to tf 1.14

* update

* reduce count to workaround https://github.com/ray-project/ray/issues/5125

* Update impala.py

* placeholder

* comments

* update
This commit is contained in:
Eric Liang
2019-07-09 20:22:30 -07:00
committed by GitHub
parent 5733690aa6
commit 5ab5017c67
4 changed files with 33 additions and 38 deletions
@@ -105,8 +105,13 @@ class AggregationWorkerBase(object):
self.batch_buffer.append(sample_batch)
if sum(b.count
for b in self.batch_buffer) >= self.train_batch_size:
train_batch = self.batch_buffer[0].concat_samples(
self.batch_buffer)
if len(self.batch_buffer) == 1:
# make a defensive copy to avoid sharing plasma memory
# across multiple threads
train_batch = self.batch_buffer[0].copy()
else:
train_batch = self.batch_buffer[0].concat_samples(
self.batch_buffer)
yield train_batch
self.batch_buffer = []