Skip to content

Commit

Permalink
Revert "Potential fix for Windows errors"
Browse files Browse the repository at this point in the history
This reverts commit 1e1a18f.
  • Loading branch information
TaperChipmunk32 committed Oct 28, 2024
1 parent 1e1a18f commit 6355327
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def test_train_non_empty_corpus() -> None:
)
trainer.train()
trainer.save()
trainer.close()

finetuned_engine = HuggingFaceNmtEngine(temp_dir, src_lang="es", tgt_lang="en", max_length=20)
finetuned_result = finetuned_engine.translate("una habitación individual por semana")
Expand Down Expand Up @@ -133,7 +132,6 @@ def test_update_tokenizer_missing_char() -> None:
)
trainer_nochar.train()
trainer_nochar.save()
trainer_nochar.close()

finetuned_engine_nochar = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_nochar = finetuned_engine_nochar._tokenizer.encode(
Expand All @@ -154,7 +152,6 @@ def test_update_tokenizer_missing_char() -> None:
)
trainer_char.train()
trainer_char.save()
trainer_char.close()

finetuned_engine_char = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_char = finetuned_engine_char._tokenizer.encode(
Expand Down Expand Up @@ -223,7 +220,6 @@ def test_update_tokenizer_missing_char_skip() -> None:
)
trainer_nochar.train()
trainer_nochar.save()
trainer_nochar.close()

finetuned_engine_nochar = HuggingFaceNmtEngine(temp_dir, src_lang="en", tgt_lang="es", max_length=20)
finetuned_result_nochar = finetuned_engine_nochar._tokenizer.encode(
Expand All @@ -243,7 +239,6 @@ def test_update_tokenizer_missing_char_skip() -> None:
)
trainer_char.train()
trainer_char.save()
trainer_char.close()

finetuned_engine_char = HuggingFaceNmtEngine(temp_dir, src_lang="en", tgt_lang="es", max_length=20)
finetuned_result_char = finetuned_engine_char._tokenizer.encode(
Expand Down Expand Up @@ -297,7 +292,6 @@ def test_update_tokenizer_missing_char_src() -> None:
)
trainer_nochar.train()
trainer_nochar.save()
trainer_nochar.close()

finetuned_engine_nochar = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_nochar = finetuned_engine_nochar._tokenizer.encode(
Expand All @@ -317,7 +311,6 @@ def test_update_tokenizer_missing_char_src() -> None:
)
trainer_char.train()
trainer_char.save()
trainer_char.close()

finetuned_engine_char = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_char = finetuned_engine_char._tokenizer.encode(
Expand Down Expand Up @@ -371,7 +364,6 @@ def test_update_tokenizer_missing_char_trg() -> None:
)
trainer_nochar.train()
trainer_nochar.save()
trainer_nochar.close()

finetuned_engine_nochar = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_nochar = finetuned_engine_nochar._tokenizer.encode(
Expand All @@ -391,7 +383,6 @@ def test_update_tokenizer_missing_char_trg() -> None:
)
trainer_char.train()
trainer_char.save()
trainer_char.close()

finetuned_engine_char = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_char = finetuned_engine_char._tokenizer.encode(
Expand Down Expand Up @@ -445,7 +436,6 @@ def test_update_tokenizer_no_missing_char() -> None:
)
trainer_nochar.train()
trainer_nochar.save()
trainer_nochar.close()

finetuned_engine_nochar = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_nochar = finetuned_engine_nochar._tokenizer.encode("una habitación individual por semana")
Expand All @@ -463,7 +453,6 @@ def test_update_tokenizer_no_missing_char() -> None:
)
trainer_char.train()
trainer_char.save()
trainer_char.close()

finetuned_engine_char = HuggingFaceNmtEngine(temp_dir, src_lang="en_XX", tgt_lang="es_XX", max_length=20)
finetuned_result_char = finetuned_engine_char._tokenizer.encode("una habitación individual por semana")
Expand Down

0 comments on commit 6355327

Please sign in to comment.