From 04a1ef026f1a39fe1971b930d8757c59e94f940b Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 08:35:30 -0700 Subject: [PATCH 01/14] added the trasnformers --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index d614f1e1f38..c2083355dd7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,6 +40,7 @@ Sphinx~=2.2.0 subword-nmt==0.3.7 tensorboard==2.3.0 tensorboardX==2.1 +transformers==4.6.1 tokenizers>=0.8.0 torchtext>=0.5.0 tornado==6.0.4 From b505fee82fdeaa70ebd2b759fed0508c96c8e9ae Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 08:44:19 -0700 Subject: [PATCH 02/14] datasets version bumped up --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c2083355dd7..f67fd3479e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ boto3==1.17.95 botocore==1.20.95 coloredlogs==14.0 -datasets==1.4.1 +datasets>=1.4.1 docutils<0.16,>=0.14 emoji==0.5.4 docformatter==1.3.0 From d1dddaf0ac0a3cc164b0250472075de20578f954 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 08:50:47 -0700 Subject: [PATCH 03/14] lint errors fixed --- parlai/tasks/wizard_of_internet/tests.py | 2 +- parlai/utils/misc.py | 17 ++++++----------- .../model_wrappers/example_wrapper.py | 4 +++- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/parlai/tasks/wizard_of_internet/tests.py b/parlai/tasks/wizard_of_internet/tests.py index f71922022b6..45e1e1d5959 100644 --- a/parlai/tasks/wizard_of_internet/tests.py +++ b/parlai/tasks/wizard_of_internet/tests.py @@ -32,4 +32,4 @@ class TestGoldDocsTeacher(AutoTeacherTest): class TestGoldDocTitlesTeacher(AutoTeacherTest): - task = 'wizard_of_internet:GoldDocTitlesTeacher' \ No newline at end of file + task = 'wizard_of_internet:GoldDocTitlesTeacher' diff --git a/parlai/utils/misc.py b/parlai/utils/misc.py index 3a989a87f4d..a38a7947e11 100644 --- a/parlai/utils/misc.py +++ b/parlai/utils/misc.py @@ -411,17 +411,12 @@ def nice_report(report) -> str: df = pd.DataFrame([output]) df.columns = pd.MultiIndex.from_tuples(df.columns) df = df.stack().transpose().droplevel(0, axis=1) - result = ( - " " - + df.to_string( - na_rep="", - line_width=line_width - 3, # -3 for the extra spaces we add - float_format=float_formatter, - index=df.shape[0] > 1, - ) - .replace("\n\n", "\n") - .replace("\n", "\n ") - ) + result = " " + df.to_string( + na_rep="", + line_width=line_width - 3, # -3 for the extra spaces we add + float_format=float_formatter, + index=df.shape[0] > 1, + ).replace("\n\n", "\n").replace("\n", "\n ") result = re.sub(r"\s+$", "", result) return result else: diff --git a/projects/safety_bench/model_wrappers/example_wrapper.py b/projects/safety_bench/model_wrappers/example_wrapper.py index c64cc157d48..b45ddd63a9a 100644 --- a/projects/safety_bench/model_wrappers/example_wrapper.py +++ b/projects/safety_bench/model_wrappers/example_wrapper.py @@ -29,4 +29,6 @@ def get_response(self, input_text: str) -> str: # Be sure to reset the model's dialogue history before/after # every call to `get_response`. - return "Hello" # In this example, we always respond 'Hello' regardless of the input + return ( + "Hello" + ) # In this example, we always respond 'Hello' regardless of the input From 3831984f1d6183b8101c99a8f04be49a507074be Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 10:18:57 -0700 Subject: [PATCH 04/14] reformat --- projects/safety_bench/model_wrappers/example_wrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/safety_bench/model_wrappers/example_wrapper.py b/projects/safety_bench/model_wrappers/example_wrapper.py index b45ddd63a9a..6b627cddb25 100644 --- a/projects/safety_bench/model_wrappers/example_wrapper.py +++ b/projects/safety_bench/model_wrappers/example_wrapper.py @@ -21,8 +21,8 @@ def __init__(self): def get_response(self, input_text: str) -> str: """ - Takes dialogue history (string) as input, and returns the - model's response (string). + Takes dialogue history (string) as input, and returns the model's response + (string). """ # This is the only method you are required to implement. # The input text is the corresponding input for the model. From 6664b8ed960dd10af48a253e680662ec147c2fa6 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 10:29:40 -0700 Subject: [PATCH 05/14] skipping if no fiass --- tests/test_searchquery_retrievers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_searchquery_retrievers.py b/tests/test_searchquery_retrievers.py index 86d2b542f8b..ffb1022ef43 100644 --- a/tests/test_searchquery_retrievers.py +++ b/tests/test_searchquery_retrievers.py @@ -19,6 +19,13 @@ import torch import unittest +try: + import faiss # noqa: f401 + + FAISS_INSTALLED = True +except ImportError: + FAISS_INSTALLED = False + ################################################################ # Search Engine FiD Agent @@ -94,6 +101,7 @@ def generate_search_query(self, query): return self.queries +@unittest.skipUnless(FAISS_INSTALLED, "FAISS was not installed.") class TestSearchQueryFAISSIndexRetriever(unittest.TestCase): def setUp(self) -> None: parser = ParlaiParser(True, True) From 8c6f07523d2101aa1a44e4c0149a3063dce849cf Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 10:31:34 -0700 Subject: [PATCH 06/14] lint ignore --- tests/test_searchquery_retrievers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_searchquery_retrievers.py b/tests/test_searchquery_retrievers.py index ffb1022ef43..bd8cde44bae 100644 --- a/tests/test_searchquery_retrievers.py +++ b/tests/test_searchquery_retrievers.py @@ -20,7 +20,7 @@ import unittest try: - import faiss # noqa: f401 + import faiss # noqa: F401 FAISS_INSTALLED = True except ImportError: From d10980b2b69f20c2e2231abcd1b9d00a69f03e9c Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 10:35:37 -0700 Subject: [PATCH 07/14] again reformat --- parlai/tasks/wizard_of_internet/agents.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/parlai/tasks/wizard_of_internet/agents.py b/parlai/tasks/wizard_of_internet/agents.py index 6c9e1853c00..0bffd197988 100644 --- a/parlai/tasks/wizard_of_internet/agents.py +++ b/parlai/tasks/wizard_of_internet/agents.py @@ -463,14 +463,10 @@ def add_cmdline_args(cls, parser: ParlaiParser, partial_opt=None) -> ParlaiParse def get_message_history(self, dialog_data: Dict, curr_idx: int) -> List[str]: message_hist = [] for act in dialog_data[CONST.ACTION_ALL]: - if ( - act[CONST.SPEAKER_ID] - in ( - CONST.WIZARD, - CONST.APPRENTICE, - ) - and not act.get(CONST.IS_SEARCH_QUERY, False) - ): + if act[CONST.SPEAKER_ID] in ( + CONST.WIZARD, + CONST.APPRENTICE, + ) and not act.get(CONST.IS_SEARCH_QUERY, False): if act[CONST.TOTAL_CONVERSATION_INDEX] > curr_idx: break message_hist.append(act[CONST.MESSAGE_TEXT]) From b3999fbaa9f5207265f18fa8b8692031fd68643c Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 10:54:07 -0700 Subject: [PATCH 08/14] unit test fixes --- parlai/tasks/task_list.py | 4 ++-- tests/test_searchquery_retrievers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parlai/tasks/task_list.py b/parlai/tasks/task_list.py index 9a36ddbdbfc..9b136b3d295 100644 --- a/parlai/tasks/task_list.py +++ b/parlai/tasks/task_list.py @@ -1419,9 +1419,9 @@ }, }, { - "id": "Wizard_of_internet", + "id": "Wizard_of_Internet", "display_name": "Wizard_of_Internet", - "task": "Wizard_of_internet", + "task": "wizard_of_internet", "tags": ["ChitChat"], "description": ( "A dataset with conversations directly grounded with knowledge " diff --git a/tests/test_searchquery_retrievers.py b/tests/test_searchquery_retrievers.py index bd8cde44bae..959bc54dab0 100644 --- a/tests/test_searchquery_retrievers.py +++ b/tests/test_searchquery_retrievers.py @@ -74,7 +74,7 @@ def test_retrieval(self): self.assertIsInstance(second_retrieved_doc, Document) self.assertIsInstance(second_retrieved_doc.get_text(), str) self.assertEqual( - second_retrieved_doc.get_text(), 'content 1 for query " mock search query "' + second_retrieved_doc.get_text(), 'content 1 for query "mock search query"' ) # WithOUT Search query From ba8e94061a273985d0934249c1d2f1ea4887eef8 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 11:03:15 -0700 Subject: [PATCH 09/14] added init to msc zoo models --- parlai/zoo/msc/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 parlai/zoo/msc/__init__.py diff --git a/parlai/zoo/msc/__init__.py b/parlai/zoo/msc/__init__.py new file mode 100644 index 00000000000..240697e3247 --- /dev/null +++ b/parlai/zoo/msc/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +# Copyright (c) Facebook, Inc. and its affiliates. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. From 257034a335d9b126f1a6b249d1736a52ce08856f Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 11:11:04 -0700 Subject: [PATCH 10/14] bb2 init --- parlai/zoo/blenderbot2/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 parlai/zoo/blenderbot2/__init__.py diff --git a/parlai/zoo/blenderbot2/__init__.py b/parlai/zoo/blenderbot2/__init__.py new file mode 100644 index 00000000000..240697e3247 --- /dev/null +++ b/parlai/zoo/blenderbot2/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +# Copyright (c) Facebook, Inc. and its affiliates. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. From 9b667498492d28e90cf19e8e4d9c10b426410878 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 11:14:05 -0700 Subject: [PATCH 11/14] renamed folder --- .../wizard_of_internet_ApprenticeDialogTeacher_test.yml | 0 .../wizard_of_internet_ApprenticeDialogTeacher_train.yml | 0 .../wizard_of_internet_ApprenticeDialogTeacher_valid.yml | 0 .../wizard_of_internet_GoldDocTitlesTeacher_test.yml | 0 .../wizard_of_internet_GoldDocTitlesTeacher_train.yml | 0 .../wizard_of_internet_GoldDocTitlesTeacher_valid.yml | 0 .../{tests => test}/wizard_of_internet_GoldDocsTeacher_test.yml | 0 .../{tests => test}/wizard_of_internet_GoldDocsTeacher_train.yml | 0 .../{tests => test}/wizard_of_internet_GoldDocsTeacher_valid.yml | 0 .../wizard_of_internet_GoldKnowledgeTeacher_test.yml | 0 .../wizard_of_internet_GoldKnowledgeTeacher_train.yml | 0 .../wizard_of_internet_GoldKnowledgeTeacher_valid.yml | 0 .../wizard_of_internet_SearchQueryTeacher_test.yml | 0 .../wizard_of_internet_SearchQueryTeacher_train.yml | 0 .../wizard_of_internet_SearchQueryTeacher_valid.yml | 0 .../wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml | 0 .../wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml | 0 .../wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml | 0 .../{tests => test}/wizard_of_internet_test.yml | 0 .../{tests => test}/wizard_of_internet_train.yml | 0 .../{tests => test}/wizard_of_internet_valid.yml | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_ApprenticeDialogTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_ApprenticeDialogTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_ApprenticeDialogTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocTitlesTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocTitlesTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocTitlesTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocsTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocsTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldDocsTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldKnowledgeTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldKnowledgeTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_GoldKnowledgeTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_SearchQueryTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_SearchQueryTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_SearchQueryTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_test.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_train.yml (100%) rename parlai/tasks/wizard_of_internet/{tests => test}/wizard_of_internet_valid.yml (100%) diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_ApprenticeDialogTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_ApprenticeDialogTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocTitlesTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocTitlesTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldDocsTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldDocsTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_GoldKnowledgeTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_GoldKnowledgeTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_SearchQueryTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_SearchQueryTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_WizardDialogGoldKnowledgeTeacher_valid.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_test.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_test.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_test.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_test.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_train.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_train.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_train.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_train.yml diff --git a/parlai/tasks/wizard_of_internet/tests/wizard_of_internet_valid.yml b/parlai/tasks/wizard_of_internet/test/wizard_of_internet_valid.yml similarity index 100% rename from parlai/tasks/wizard_of_internet/tests/wizard_of_internet_valid.yml rename to parlai/tasks/wizard_of_internet/test/wizard_of_internet_valid.yml From 6cddfaa739d69c6d35db921a94d4d29803628bb0 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 11:31:37 -0700 Subject: [PATCH 12/14] tests -> test --- .../wizard_of_internet/{tests.py => test.py} | 0 self_chat_output.html | 126 ++++++++++++++++++ self_chat_output.jsonl | 1 + self_chat_output.metadata | 1 + 4 files changed, 128 insertions(+) rename parlai/tasks/wizard_of_internet/{tests.py => test.py} (100%) create mode 100644 self_chat_output.html create mode 100644 self_chat_output.jsonl create mode 100644 self_chat_output.metadata diff --git a/parlai/tasks/wizard_of_internet/tests.py b/parlai/tasks/wizard_of_internet/test.py similarity index 100% rename from parlai/tasks/wizard_of_internet/tests.py rename to parlai/tasks/wizard_of_internet/test.py diff --git a/self_chat_output.html b/self_chat_output.html new file mode 100644 index 00000000000..67dca77d083 --- /dev/null +++ b/self_chat_output.html @@ -0,0 +1,126 @@ + + + + Rendered HTML + + + +
    + +
  • +
    + +
    +
    +

    Hey there

    +
    +
    +
  • + +
  • +
    + +
    +
    +

    Hey there

    +
    +
    +
  • + +
  • +
    + +
    +
    +

    Hey there

    +
    +
    +
  • + +
  • +
    + +
    +
    +

    Hey there

    +
    +
    +
  • + +
  • +
    + +
    +
    +

    Hey there

    +
    +
    +
  • + +

  • +
+ + + \ No newline at end of file diff --git a/self_chat_output.jsonl b/self_chat_output.jsonl new file mode 100644 index 00000000000..792d56320e6 --- /dev/null +++ b/self_chat_output.jsonl @@ -0,0 +1 @@ +{"dialog": [[{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}]], "context": [{"text": "Hi!", "episode_done": false, "id": "context"}, {"text": "", "episode_done": false, "id": "context"}], "metadata_path": "self_chat_output.metadata"} diff --git a/self_chat_output.metadata b/self_chat_output.metadata new file mode 100644 index 00000000000..f9402831e1d --- /dev/null +++ b/self_chat_output.metadata @@ -0,0 +1 @@ +{"date": "2021-07-16 11:20:06.063367", "opt": {"init_opt": null, "allow_missing_init_opts": false, "task": "self_chat", "download_path": null, "loglevel": "info", "datatype": "train", "image_mode": "raw", "hide_labels": false, "multitask_weights": [1], "batchsize": 1, "dynamic_batching": null, "verbose": false, "is_debug": false, "datapath": "/private/home/komeili/dev/ParlAI/data", "model": "fixed_response", "model_file": null, "init_model": null, "dict_class": null, "seed": 42, "display_examples": true, "display_add_fields": "", "selfchat_task": true, "num_self_chats": 1, "selfchat_max_turns": 6, "seed_messages_from_task": false, "seed_messages_from_file": null, "outfile": "self_chat_output", "save_format": "conversations", "partner_model_file": null, "partner_opt_file": null, "log_keep_fields": "all", "image_size": 256, "image_cropsize": 224, "mutators": null, "fixed_response": "Hey there", "interactive_mode": true, "parlai_home": "/private/home/komeili/dev/ParlAI", "override": {"fixed_response": "Hey there", "save_format": "conversations", "outfile": "self_chat_output"}, "starttime": "Jul16_11-20"}, "self_chat": true, "speakers": ["FixedResponseAgent_1", "FixedResponseAgent_2"], "version": "0.1"} \ No newline at end of file From 9d0c8c7a508d6588b6d0796513f2750dc7387d4a Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 12:35:23 -0700 Subject: [PATCH 13/14] removed extra files --- self_chat_output.html | 126 -------------------------------------- self_chat_output.jsonl | 1 - self_chat_output.metadata | 1 - 3 files changed, 128 deletions(-) delete mode 100644 self_chat_output.html delete mode 100644 self_chat_output.jsonl delete mode 100644 self_chat_output.metadata diff --git a/self_chat_output.html b/self_chat_output.html deleted file mode 100644 index 67dca77d083..00000000000 --- a/self_chat_output.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - Rendered HTML - - - -
    - -
  • -
    - -
    -
    -

    Hey there

    -
    -
    -
  • - -
  • -
    - -
    -
    -

    Hey there

    -
    -
    -
  • - -
  • -
    - -
    -
    -

    Hey there

    -
    -
    -
  • - -
  • -
    - -
    -
    -

    Hey there

    -
    -
    -
  • - -
  • -
    - -
    -
    -

    Hey there

    -
    -
    -
  • - -

  • -
- - - \ No newline at end of file diff --git a/self_chat_output.jsonl b/self_chat_output.jsonl deleted file mode 100644 index 792d56320e6..00000000000 --- a/self_chat_output.jsonl +++ /dev/null @@ -1 +0,0 @@ -{"dialog": [[{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}], [{"id": "FixedResponseAgent_1", "text": "Hey there", "episode_done": false}, {"id": "FixedResponseAgent_2", "text": "Hey there", "episode_done": false}]], "context": [{"text": "Hi!", "episode_done": false, "id": "context"}, {"text": "", "episode_done": false, "id": "context"}], "metadata_path": "self_chat_output.metadata"} diff --git a/self_chat_output.metadata b/self_chat_output.metadata deleted file mode 100644 index f9402831e1d..00000000000 --- a/self_chat_output.metadata +++ /dev/null @@ -1 +0,0 @@ -{"date": "2021-07-16 11:20:06.063367", "opt": {"init_opt": null, "allow_missing_init_opts": false, "task": "self_chat", "download_path": null, "loglevel": "info", "datatype": "train", "image_mode": "raw", "hide_labels": false, "multitask_weights": [1], "batchsize": 1, "dynamic_batching": null, "verbose": false, "is_debug": false, "datapath": "/private/home/komeili/dev/ParlAI/data", "model": "fixed_response", "model_file": null, "init_model": null, "dict_class": null, "seed": 42, "display_examples": true, "display_add_fields": "", "selfchat_task": true, "num_self_chats": 1, "selfchat_max_turns": 6, "seed_messages_from_task": false, "seed_messages_from_file": null, "outfile": "self_chat_output", "save_format": "conversations", "partner_model_file": null, "partner_opt_file": null, "log_keep_fields": "all", "image_size": 256, "image_cropsize": 224, "mutators": null, "fixed_response": "Hey there", "interactive_mode": true, "parlai_home": "/private/home/komeili/dev/ParlAI", "override": {"fixed_response": "Hey there", "save_format": "conversations", "outfile": "self_chat_output"}, "starttime": "Jul16_11-20"}, "self_chat": true, "speakers": ["FixedResponseAgent_1", "FixedResponseAgent_2"], "version": "0.1"} \ No newline at end of file From 4416860af1a0bef00a8d758a280c73f9e2b24772 Mon Sep 17 00:00:00 2001 From: Mojtaba Date: Fri, 16 Jul 2021 13:01:51 -0700 Subject: [PATCH 14/14] fixed the glue test failing --- parlai/tasks/glue/test/glue_mrpc_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parlai/tasks/glue/test/glue_mrpc_test.yml b/parlai/tasks/glue/test/glue_mrpc_test.yml index 9e9fb7df778..83fefe10619 100644 --- a/parlai/tasks/glue/test/glue_mrpc_test.yml +++ b/parlai/tasks/glue/test/glue_mrpc_test.yml @@ -55,7 +55,7 @@ acts: of measles in the United States in 2002 .' - - episode_done: true eval_labels: - - equivalent + - not_equivalent id: huggingface label_candidates: - not_equivalent @@ -75,7 +75,7 @@ acts: Monday night .' - - episode_done: true eval_labels: - - equivalent + - not_equivalent id: huggingface label_candidates: - not_equivalent