From ac3fc13c7e29d077efe05fa6c77fbc934672e918 Mon Sep 17 00:00:00 2001 From: Ravi Rahman Date: Tue, 15 Mar 2022 23:49:00 -0700 Subject: [PATCH 1/2] Increased the timeout for `test_trainer.py` Increased the timeout to 30s, since some tests were failing at a 5s timeout. See https://github.com/mosaicml/composer/issues/774. --- tests/trainer/test_trainer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/trainer/test_trainer.py b/tests/trainer/test_trainer.py index 31b2d86243..946e18cd2e 100755 --- a/tests/trainer/test_trainer.py +++ b/tests/trainer/test_trainer.py @@ -25,7 +25,7 @@ from tests.common import (RandomClassificationDataset, RandomImageDataset, SimpleConvModel, SimpleModel, device, world_size) - +@pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerInit(): @pytest.fixture @@ -114,7 +114,7 @@ def test_init_with_max_duration_in_batches(self, config): @world_size(1, 2) @device('cpu', 'gpu', 'gpu-amp', precision=True) -@pytest.mark.timeout(5) +@pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerEquivalence(): reference_model: Model @@ -260,7 +260,7 @@ def after_forward(self, state, logger): assert not torch.allclose(original_outputs[0], state.outputs[0]) - +@pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerEvents(): @pytest.fixture @@ -308,7 +308,7 @@ def test_data_not_augmented(self, config): config management to retrieve the objects to test. """ - +@pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerAssets: @pytest.fixture From 8c7cda8a09f8adcacd2fadc7b4bc58425037e29a Mon Sep 17 00:00:00 2001 From: Ravi Rahman Date: Tue, 15 Mar 2022 23:49:19 -0700 Subject: [PATCH 2/2] Formatting --- tests/trainer/test_trainer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/trainer/test_trainer.py b/tests/trainer/test_trainer.py index 946e18cd2e..5d8b251736 100755 --- a/tests/trainer/test_trainer.py +++ b/tests/trainer/test_trainer.py @@ -25,6 +25,7 @@ from tests.common import (RandomClassificationDataset, RandomImageDataset, SimpleConvModel, SimpleModel, device, world_size) + @pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerInit(): @@ -260,6 +261,7 @@ def after_forward(self, state, logger): assert not torch.allclose(original_outputs[0], state.outputs[0]) + @pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerEvents(): @@ -308,6 +310,7 @@ def test_data_not_augmented(self, config): config management to retrieve the objects to test. """ + @pytest.mark.timeout(30) # TODO lower the timeout. See https://github.com/mosaicml/composer/issues/774. class TestTrainerAssets: