def test_dbll_babi(self): from parlai.core.params import ParlaiParser from parlai.tasks.dbll_babi.agents import TaskTeacher, tasks opt = ParlaiParser().parse_args(args=self.args) for i in tasks.keys(): for dt in ['train:ordered', 'valid', 'test']: opt['datatype'] = dt opt['task'] = 'dbll_babi:task:{}_p{}'.format(i, 0.5) teacher = TaskTeacher(opt) reply = teacher.act() check(opt, reply) shutil.rmtree(self.TMP_PATH)
def test_moviedialog(self): from parlai.core.params import ParlaiParser from parlai.tasks.moviedialog.agents import TaskTeacher, tasks opt = ParlaiParser().parse_args(args=self.args) from parlai.tasks.moviedialog.agents import KBTeacher teacher = KBTeacher(opt) reply = teacher.act() check_no_labels(opt, reply) for i in tasks.keys(): for dt in ['train:ordered', 'valid', 'test']: opt['datatype'] = dt opt['task'] = 'moviedialog:task:{}'.format(i) teacher = TaskTeacher(opt) reply = teacher.act() check(opt, reply) shutil.rmtree(self.TMP_PATH)