368088be85294bc312522403b5445f2ac3ca1071,rllib/policy/sample_batch.py,MultiAgentBatch,concat_samples,#Any#,260
Before Change
policy_batches = collections.defaultdict(list)
total_count = 0
for s in samples:
assert isinstance(s, MultiAgentBatch)
for policy_id, batch in s.policy_batches.items():
policy_batches[policy_id].append(batch)
total_count += s.count
out = {}
After Change
policy_batches = collections.defaultdict(list)
total_count = 0
for s in samples:
if not isinstance(s, MultiAgentBatch):
raise ValueError(
"`MultiAgentBatch.concat_samples()` can only concat "
"MultiAgentBatch types, not {}!".format(type(s).__name__))
for policy_id, batch in s.policy_batches.items():
policy_batches[policy_id].append(batch)
total_count += s.count
out = {}
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: ray-project/ray
Commit Name: 368088be85294bc312522403b5445f2ac3ca1071
Time: 2020-06-04
Author: sven@anyscale.io
File Name: rllib/policy/sample_batch.py
Class Name: MultiAgentBatch
Method Name: concat_samples
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 7d750dedf449ed4a10db1910ddf102826579b283
Time: 2018-08-17
Author: jasoli@nvidia.com
File Name: open_seq2seq/parts/rnns/attention_wrapper.py
Class Name: AttentionWrapper
Method Name: __init__
Project Name: GPflow/GPflow
Commit Name: 03364d333d4d291410b16f490215a31671dcba1d
Time: 2017-09-24
Author: art.art.v@gmail.com
File Name: gpflow/params.py
Class Name: ParamList
Method Name: append