Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)
Example #4
0
    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)