예제 #1
0
    def test_wikimovies(self):
        from parlai.core.params import ParlaiParser
        from parlai.tasks.wikimovies.agents import DefaultTeacher, KBTeacher

        opt = ParlaiParser().parse_args(args=self.args)

        teacher = KBTeacher(opt)
        reply = teacher.act()
        check_no_labels(opt, reply)

        for dt in ['train:ordered', 'valid', 'test']:
            opt['datatype'] = dt
            teacher = DefaultTeacher(opt)
            reply = teacher.act()
            check(opt, reply)

        shutil.rmtree(self.TMP_PATH)
예제 #2
0
    def test_wikimovies(self):
        from parlai.core.params import ParlaiParser
        from parlai.tasks.wikimovies.agents import DefaultTeacher, KBTeacher

        opt = ParlaiParser().parse_args(args=self.args)

        teacher = KBTeacher(opt)
        reply = teacher.act()
        check_no_labels(opt, reply)

        for dt in ['train:ordered', 'valid', 'test']:
            opt['datatype'] = dt
            teacher = DefaultTeacher(opt)
            reply = teacher.act()
            check(opt, reply)

        shutil.rmtree(self.TMP_PATH)
예제 #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)
예제 #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)