From c7f873458d6f3e58b60ac233710e91ed6466290b Mon Sep 17 00:00:00 2001 From: klshuster Date: Fri, 7 Jan 2022 16:06:26 -0500 Subject: [PATCH] ensure other batch items make it into the reply --- parlai/agents/reranker/reranker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/parlai/agents/reranker/reranker.py b/parlai/agents/reranker/reranker.py index 86a71a1aaa2..6b7db5209ed 100644 --- a/parlai/agents/reranker/reranker.py +++ b/parlai/agents/reranker/reranker.py @@ -514,6 +514,7 @@ def batch_act(self, observations: List[Message]) -> List[Message]: inference_batch_reply = super().batch_act(observations) for i, resp in enumerate(inference_batch_reply): beam_texts = batch_reply[i].get('beam_texts', []) + batch_reply[i] = resp # add metrics, other response items new_beam_texts = [(*b, strategy) for b in resp.get('beam_texts', [])] batch_reply[i].force_set('beam_texts', beam_texts + new_beam_texts) # 2. Rerank