-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Tests for the static turn annotations tasks #3254
Changes from 19 commits
69bc29d
ff30337
aa7dfc7
e0d1315
b467aed
c787729
3346dbf
ba3a3de
09f6f1c
510ec9d
b822289
d5dd75d
8a08589
8c14ca8
c5d83c0
1b2670a
b4efd7b
c33f45f
53d8c34
ea6be0d
345d080
36fc211
7748efd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
End-to-end testing for the chat demo crowdsourcing task. | ||
""" | ||
|
||
import os | ||
import sys | ||
import unittest | ||
|
||
# Desired inputs/outputs | ||
|
@@ -339,16 +341,22 @@ | |
|
||
try: | ||
|
||
# From the Mephisto repo | ||
from examples.parlai_chat_task_demo.parlai_test_script import TASK_DIRECTORY | ||
import mephisto | ||
from mephisto.server.blueprints.parlai_chat.parlai_chat_blueprint import ( | ||
SharedParlAITaskState, | ||
BLUEPRINT_TYPE, | ||
) | ||
|
||
from parlai.crowdsourcing.utils.tests import CrowdsourcingTestMixin | ||
# From the Mephisto repo | ||
mephisto_repo_folder = os.path.dirname( | ||
os.path.dirname(os.path.abspath(mephisto.__file__)) | ||
) | ||
sys.path.insert(1, mephisto_repo_folder) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a huge red flag There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but not sure about a short-term workaround given @JackUrb 's comment below. Maybe I can just add a TODO here for the time being? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, I've reverted this change in this PR, just because this issue doesn't need to be resolved right now. Without this change, this test will be silently skipped - I've fixed this problem in a better way and gotten this test to pass again in #3262 |
||
from examples.parlai_chat_task_demo.parlai_test_script import TASK_DIRECTORY | ||
|
||
from parlai.crowdsourcing.utils.tests import AbstractCrowdsourcingTest | ||
|
||
class TestChatDemo(CrowdsourcingTestMixin, unittest.TestCase): | ||
class TestChatDemo(AbstractCrowdsourcingTest): | ||
""" | ||
Test the chat demo crowdsourcing task. | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nit: would this test break if my ouputs have any time-related values such as timestamp? is the "outputs" where task_start task_end field logged there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, yes, if you have a timestamp in your output, this would break - lemme know if that's a common use case for you and we can find a workaround. The task_start and task_end fields get logged outside "outputs", in their own fields