예제 #1
0
	def test_version(self):
		base_test_version(SwitchboardCorpus)
예제 #2
0
 def test_version(self):
     base_test_version(MSCOCO)
예제 #3
0
	def test_version(self):
		base_test_version(UbuntuCorpus)
예제 #4
0
    def test_init(self, load_opensubtitles):
        super().base_test_init(load_opensubtitles())
        super().base_test_all_unknown(load_opensubtitles(10000))

    def test_restart(self, load_opensubtitles):
        super().base_test_restart(load_opensubtitles())

    @pytest.mark.dependency(depends=["TestOpenSubtitles::test_init"])
    def test_get_batch(self, load_opensubtitles):
        super().base_test_get_batch(load_opensubtitles())

    @pytest.mark.dependency(depends=["TestOpenSubtitles::test_init"])
    def test_get_next_batch(self, load_opensubtitles):
        super().base_test_get_next_batch(load_opensubtitles())

    @pytest.mark.dependency(depends=["TestOpenSubtitles::test_init"])
    def test_convert(self, load_opensubtitles):
        super().base_test_convert(load_opensubtitles())

    def test_teacher_forcing_metric(self, load_opensubtitles):
        super().base_test_teacher_forcing_metric(load_opensubtitles())

    def test_teacher_inference_metric(self, load_opensubtitles):
        super().base_test_teacher_inference_metric(load_opensubtitles())

    def test_init_multi_runs(self, load_opensubtitles):
        super().base_test_multi_runs([load_opensubtitles() for i in range(3)])


base_test_version(OpenSubtitles)
예제 #5
0
	def test_init(self, load_mscoco):
		super().base_test_init(load_mscoco())
		super().base_test_all_unknown(load_mscoco(10000))

	def test_restart(self, load_mscoco):
		super().base_test_restart(load_mscoco())

	@pytest.mark.dependency(depends=["TestMSCOCO::test_init"])
	def test_get_batch(self, load_mscoco):
		super().base_test_get_batch(load_mscoco())

	@pytest.mark.dependency(depends=["TestMSCOCO::test_init"])
	def test_get_next_batch(self, load_mscoco):
		super().base_test_get_next_batch(load_mscoco())

	@pytest.mark.dependency(depends=["TestMSCOCO::test_init"])
	def test_convert(self, load_mscoco):
		super().base_test_convert(load_mscoco())

	def test_teacher_forcing_metric(self, load_mscoco):
		super().base_test_teacher_forcing_metric(load_mscoco())

	def test_teacher_inference_metric(self, load_mscoco):
		super().base_test_teacher_inference_metric(load_mscoco())

	def test_init_multi_runs(self, load_mscoco):
		super().base_test_multi_runs([load_mscoco() for i in range(3)])


base_test_version(MSCOCO)
예제 #6
0
        super().base_test_get_next_batch(load_switchboardcorpus())

    @pytest.mark.dependency(depends=["TestSwitchboardCorpus::test_init"])
    def test_convert(self, load_switchboardcorpus):
        super().base_test_convert(load_switchboardcorpus())

    def test_multi_turn_convert(self, load_switchboardcorpus):
        super().base_test_multi_turn_convert(load_switchboardcorpus())

    def test_teacher_forcing_metric(self, load_switchboardcorpus):
        super().base_test_teacher_forcing_metric(load_switchboardcorpus())

    def test_teacher_inference_metric(self, load_switchboardcorpus):
        super().base_test_teacher_inference_metric(load_switchboardcorpus())

    def test_teacher_precision_recall_metric(self, load_switchboardcorpus):
        dl = load_switchboardcorpus()
        glove = Glove("./tests/wordvector/dummy_glove/300d/")
        embed = glove.load_dict(dl.vocab_list)
        assert isinstance(
            dl.get_multi_ref_metric(generated_num_per_context=3,
                                    word2vec=embed), MetricBase)

    def test_init_multi_runs(self, load_switchboardcorpus):
        super().base_test_multi_runs(
            [load_switchboardcorpus() for i in range(3)])


base_test_version(UbuntuCorpus)
base_test_version(SwitchboardCorpus)
예제 #7
0
 def test_version(self):
     base_test_version(OpenSubtitles)
예제 #8
0
class TestSST(TestSentenceClassification):

	@pytest.mark.dependency()
	def test_init(self, load_sst):
		super().base_test_init(load_sst())
		super().base_test_all_unknown(load_sst(1000000))

	def test_restart(self, load_sst):
		super().base_test_restart(load_sst())

	@pytest.mark.dependency(depends=["TestSST::test_init"])
	def test_get_batch(self, load_sst):
		super().base_test_get_batch(load_sst())

	@pytest.mark.dependency(depends=["TestSST::test_init"])
	def test_get_next_batch(self, load_sst):
		super().base_test_get_next_batch(load_sst())

	@pytest.mark.dependency(depends=["TestSST::test_init"])
	def test_convert(self, load_sst):
		super().base_test_convert(load_sst())

	def test_metric(self, load_sst):
		super().base_test_metric(load_sst())

	def test_init_multi_runs(self, load_sst):
		super().base_test_multi_runs([load_sst() for i in range(3)])


base_test_version(SST)