Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Fix issue #3502: "Message already contains key dyn_batch_idx" #3505

Merged
merged 2 commits into from Mar 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions parlai/core/worlds.py
Expand Up @@ -1094,7 +1094,7 @@ def parley(self):
# we log the task act and the index of the act
# in the buffer for world logging purposes
self._task_acts[i] = act # for world logging
self._task_acts[i]['dyn_batch_idx'] = i
self._task_acts[i].force_set('dyn_batch_idx', i)

obs = self.worlds[i].get_model_agent().observe(act)
self._obs[i] = obs
Expand Down Expand Up @@ -1170,7 +1170,7 @@ def parley(self):
# we log the task act and the index of the act
# in the buffer for world logging purposes
self._task_acts[i] = act
self._task_acts[i]['dyn_batch_idx'] = i
self._task_acts[i].force_set('dyn_batch_idx', i)
# save the observations to form a batch
obs = self.worlds[i].get_model_agent().observe(act)
self._scores[i] = self._score(obs)
Expand Down