"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e49c71fc4ce0a89e1e1b1a20ab42b6e3f0038e93"
Unverified Commit 3601aa8f authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[tests] fix copy-n-paste error (#17312)

* [tests] fix copy-n-paste error

* fix
parent 1b20c970
...@@ -1551,7 +1551,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): ...@@ -1551,7 +1551,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
a = torch.ones(1000, bs) + 0.001 a = torch.ones(1000, bs) + 0.001
b = torch.ones(1000, bs) - 0.001 b = torch.ones(1000, bs) - 0.001
# 1. with mem metrics enabled # 1. with fp16_full_eval disabled
trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, skip_memory_metrics=False) trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, skip_memory_metrics=False)
metrics = trainer.evaluate() metrics = trainer.evaluate()
del trainer del trainer
...@@ -1572,7 +1572,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): ...@@ -1572,7 +1572,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
# perfect world: fp32_eval == close to zero # perfect world: fp32_eval == close to zero
self.assertLess(fp32_eval, 5_000) self.assertLess(fp32_eval, 5_000)
# 2. with mem metrics disabled # 2. with fp16_full_eval enabled
trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, fp16_full_eval=True, skip_memory_metrics=False) trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, fp16_full_eval=True, skip_memory_metrics=False)
metrics = trainer.evaluate() metrics = trainer.evaluate()
fp16_init = metrics["init_mem_gpu_alloc_delta"] fp16_init = metrics["init_mem_gpu_alloc_delta"]
...@@ -1611,7 +1611,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): ...@@ -1611,7 +1611,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
a = torch.ones(1000, bs) + 0.001 a = torch.ones(1000, bs) + 0.001
b = torch.ones(1000, bs) - 0.001 b = torch.ones(1000, bs) - 0.001
# 1. with mem metrics enabled # 1. with bf16_full_eval disabled
trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, skip_memory_metrics=False) trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, skip_memory_metrics=False)
metrics = trainer.evaluate() metrics = trainer.evaluate()
del trainer del trainer
...@@ -1632,7 +1632,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon): ...@@ -1632,7 +1632,7 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
# perfect world: fp32_eval == close to zero # perfect world: fp32_eval == close to zero
self.assertLess(fp32_eval, 5_000) self.assertLess(fp32_eval, 5_000)
# 2. with mem metrics disabled # 2. with bf16_full_eval enabled
trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, bf16_full_eval=True, skip_memory_metrics=False) trainer = get_regression_trainer(a=a, b=b, eval_len=eval_len, bf16_full_eval=True, skip_memory_metrics=False)
metrics = trainer.evaluate() metrics = trainer.evaluate()
bf16_init = metrics["init_mem_gpu_alloc_delta"] bf16_init = metrics["init_mem_gpu_alloc_delta"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment