diff --git a/scripts/log_to_submission.py b/scripts/log_to_submission.py index 59e8028..c918b67 100644 --- a/scripts/log_to_submission.py +++ b/scripts/log_to_submission.py @@ -370,7 +370,7 @@ def outputs_to_submission( # check that question_id was passed to LM if question_id_outputs is not None: new_question = { - "outputs": question_id_outputs, + "outputs": question_id_outputs['outputs'], "meta": { "dialog_id": dialog_id, "question_id": question_id, @@ -402,6 +402,15 @@ def doc_outputs_to_submission(self, doc_id, outputs): @register_task class ruHumanEval(TextTask): + + def outputs_to_submission(self, outputs): + res = [] + for doc in outputs: + doc_id = int(self.doc_to_id(doc["doc"])) + resp = doc["filtered_resps"][0] + res.extend([self.doc_outputs_to_submission(doc_id, resp)]) + return {"data": {"test": res}} + def doc_outputs_to_submission(self, doc_id, outputs): res = { "outputs": outputs,