This repository was archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Creating Regression Tests for Multi-task Usecases #4579
Copy link
Copy link
Open
Labels
EnhancementHelp WanteddonotreapAvoid automatically marking as stale.Avoid automatically marking as stale.
Description
Hi,
I am interested in generating regression tests for a multi-task learning scenario.
While I am able to train or interact with the agents (ex: parlai dd -t task1,task2 ), when I try to create a regression test in a similar manner, I run into an exception while running pytest.
This becomes especially problematic when I have task-specific arguments that I want to include. For instance, in a perfect world, my test would look like the following:
class TestMultitask(AutoTeacherTest):
task = "task1:arg1=x,arg2=y,task2:arg3=a,arg4=b"
I believe the problem is that commas are overloaded with multiple meanings -- 1) to indicate multiple tasks and 2) to indicate multiple arguments.
For what it's worth, the traceback I have when running pytest is as following:
self = <test.Test...Multitasks object at 0x7f43efb12430>, data_regression = <pytest_regressions.data_regression.DataRegressionFixture object at 0x7f43efb12730>
def test_test_stream(self, data_regression):
"""
Test --datatype test:stream.
"""
> return self._regression(data_regression, 'test')
../../../parlai/utils/testing.py:482:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../parlai/utils/testing.py:454: in _regression
world.parley()
../../../parlai/core/worlds.py:699: in parley
self.parley_init()
../../../parlai/core/worlds.py:677: in parley_init
if self.world_idx >= 0 and self.worlds[self.world_idx].episode_done():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <parlai.core.worlds.MultiAgentDialogWorld object at 0x7f43ede89fd0>
def episode_done(self):
"""
Return if the episode is done for any subagent.
"""
done = False
for a in self.agents:
> if a.episode_done():
E AttributeError: 'xxxTeacher' object has no attribute 'episode_done'
../../../parlai/core/worlds.py:503: AttributeError
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementHelp WanteddonotreapAvoid automatically marking as stale.Avoid automatically marking as stale.