fix typos in the tests directory (#36717)
This commit is contained in:
@@ -241,7 +241,7 @@ def bytes2megabytes(x):
|
||||
return int(x / 2**20)
|
||||
|
||||
|
||||
# Copied from acclerate: https://github.com/huggingface/accelerate/blob/ee163b66fb7848892519e804688cb4ae981aacbe/src/accelerate/test_utils/scripts/external_deps/test_peak_memory_usage.py#L40C1-L73C68
|
||||
# Copied from accelerate: https://github.com/huggingface/accelerate/blob/ee163b66fb7848892519e804688cb4ae981aacbe/src/accelerate/test_utils/scripts/external_deps/test_peak_memory_usage.py#L40C1-L73C68
|
||||
class TorchTracemalloc:
|
||||
def __enter__(self):
|
||||
gc.collect()
|
||||
@@ -4086,7 +4086,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
|
||||
# Functional check
|
||||
self.assertAlmostEqual(loss, orig_loss)
|
||||
|
||||
# AOT Autograd recomputaion and nvfuser recomputation optimization
|
||||
# AOT Autograd recomputation and nvfuser recomputation optimization
|
||||
# aggressively fuses the operations and reduce the memory footprint.
|
||||
self.assertGreater(orig_peak_mem, peak_mem * 2)
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ class Seq2seqTrainerTester(TestCasePlus):
|
||||
|
||||
@require_torch
|
||||
def test_bad_generation_config_fail_early(self):
|
||||
# Tests that a bad geneartion config causes the trainer to fail early
|
||||
# Tests that a bad generation config causes the trainer to fail early
|
||||
model = AutoModelForSeq2SeqLM.from_pretrained("google-t5/t5-small")
|
||||
tokenizer = T5Tokenizer.from_pretrained("google-t5/t5-small")
|
||||
data_collator = DataCollatorForSeq2Seq(tokenizer, model=model, return_tensors="pt", padding="longest")
|
||||
|
||||
Reference in New Issue
Block a user