CHORE: Use faster test translation scenario, cut CI time by ~5mins #3046
+6
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supports #3045
Overview
Changes the model used in the translation scenario to amuch smaller one that will run much faster:
https://huggingface.co/mesolitica/finetune-translation-t5-super-super-tiny-standard-bahasa-cased
Timings
The change seems to save ~5 min on Linux, and 7+ min on MacOS.
On Linux GH runner python 3.11, test timings before:
Test timings after:
Overall that's
328 seconds
faster on python 3.11 🎉Timings vary between python versions and platforms, so the overall average speedup may differ.
Note about protobuf
This new model require that we use
protobuf<=3.20.x
, or otherwise a TypeError is thrown. There is a related thread on stackoverflow here.Here is the full traceback:
In future, we might be able to relax this pin if the
transformers
library is updated, or if we find an alternative Tokenizer model that was trained with a more recent version of protobuf.