[examples tests on multigpu] resolving require_torch_non_multi_gpu_but_fix_me (#10561)

* batch 1

* this is tpu

* deebert attempt

* the rest
This commit is contained in:
Stas Bekman
2021-03-08 11:11:40 -08:00
committed by GitHub
parent dfd16af832
commit f284089ec4
9 changed files with 35 additions and 62 deletions

View File

@@ -20,7 +20,7 @@ import unittest
from time import time
from unittest.mock import patch
from transformers.testing_utils import require_torch_non_multi_gpu_but_fix_me, require_torch_tpu
from transformers.testing_utils import require_torch_tpu
logging.basicConfig(level=logging.DEBUG)
@@ -30,7 +30,6 @@ logger = logging.getLogger()
@require_torch_tpu
class TorchXLAExamplesTests(unittest.TestCase):
@require_torch_non_multi_gpu_but_fix_me
def test_run_glue(self):
import xla_spawn
@@ -82,7 +81,6 @@ class TorchXLAExamplesTests(unittest.TestCase):
# Assert that the script takes less than 300 seconds to make sure it doesn't hang.
self.assertLess(end - start, 500)
@require_torch_non_multi_gpu_but_fix_me
def test_trainer_tpu(self):
import xla_spawn