mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
[RLlib] Issue 24074: multi-GPU learner thread key error in MA-scenarios. (#24382)
This commit is contained in:
parent
d4a906e177
commit
924adcf402
1 changed files with 10 additions and 6 deletions
|
@ -209,12 +209,16 @@ class _MultiGPULoaderThread(threading.Thread):
|
|||
if not s.local_worker.is_policy_to_train(pid, batch):
|
||||
continue
|
||||
policy = policy_map[pid]
|
||||
policy.load_batch_into_buffer(
|
||||
batch=batch
|
||||
if isinstance(batch, SampleBatch)
|
||||
else batch.policy_batches[pid],
|
||||
buffer_index=buffer_idx,
|
||||
)
|
||||
if isinstance(batch, SampleBatch):
|
||||
policy.load_batch_into_buffer(
|
||||
batch=batch,
|
||||
buffer_index=buffer_idx,
|
||||
)
|
||||
elif pid in batch.policy_batches:
|
||||
policy.load_batch_into_buffer(
|
||||
batch=batch.policy_batches[pid],
|
||||
buffer_index=buffer_idx,
|
||||
)
|
||||
|
||||
# Tag just-loaded stack as "ready".
|
||||
s.ready_tower_stacks.put(buffer_idx)
|
||||
|
|
Loading…
Add table
Reference in a new issue