Ejemplo n.º 1
0
    def test_booktest(self):
        from parlai.core.params import ParlaiParser
        from parlai.tasks.booktest.agents import EvalTeacher, StreamTeacher

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

        opt['datatype'] = 'train:ordered'
        teacher = StreamTeacher(opt)
        reply = teacher.act()
        check(opt, reply)

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

        shutil.rmtree(self.TMP_PATH)
Ejemplo n.º 2
0
    def test_booktest(self):
        from parlai.core.params import ParlaiParser
        from parlai.tasks.booktest.agents import EvalTeacher, StreamTeacher

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

        opt['datatype'] = 'train:ordered'
        teacher = StreamTeacher(opt)
        reply = teacher.act()
        check(opt, reply)

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

        shutil.rmtree(self.TMP_PATH)