Skip to content

Commit 45b36c1

Browse files
awaelchliBorda
authored andcommitted
remove outdated test (removed on master)
1 parent 782145e commit 45b36c1

File tree

5 files changed

+9
-35
lines changed

5 files changed

+9
-35
lines changed

requirements/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ mypy>=0.720, <0.800
1313
pre-commit>=1.0
1414

1515
cloudpickle>=1.3
16-
nltk>=3.3
16+
nltk<3.6
1717
pandas # needed in benchmarks

tests/models/test_horovod.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ def validation_step(self, batch, *args, **kwargs):
225225
tpipes.run_model_test_without_loggers(trainer_options, model)
226226

227227

228+
# todo: need to be fixed :]
229+
@pytest.mark.skip('TODO: flaky test - Fatal Python error: Aborted')
228230
@pytest.mark.skipif(platform.system() == "Windows", reason="Horovod is not supported on Windows")
229231
@pytest.mark.skipif(not _HOROVOD_AVAILABLE, reason="Horovod is unavailable")
230232
def test_horovod_multi_optimizer(tmpdir):

tests/overrides/test_data_parallel.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,6 @@ def test_lightning_wrapper_module_methods(wrapper_class):
4545
pl_module.predict.assert_called_with(batch)
4646

4747

48-
@pytest.mark.parametrize("wrapper_class", [
49-
LightningParallelModule,
50-
LightningDistributedModule,
51-
])
52-
def test_lightning_wrapper_module_warn_none_output(wrapper_class):
53-
""" Test that the LightningWrapper module warns about forgotten return statement. """
54-
warning_cache.clear()
55-
pl_module = MagicMock()
56-
wrapped_module = wrapper_class(pl_module)
57-
58-
pl_module.training_step.return_value = None
59-
pl_module.validation_step.return_value = None
60-
pl_module.test_step.return_value = None
61-
62-
with pytest.warns(UserWarning, match="Your training_step returned None"):
63-
pl_module.running_stage = RunningStage.TRAINING
64-
wrapped_module()
65-
66-
with pytest.warns(UserWarning, match="Your test_step returned None"):
67-
pl_module.running_stage = RunningStage.TESTING
68-
wrapped_module()
69-
70-
with pytest.warns(UserWarning, match="Your validation_step returned None"):
71-
pl_module.running_stage = RunningStage.EVALUATING
72-
wrapped_module()
73-
74-
with pytest.warns(None) as record:
75-
pl_module.running_stage = None
76-
wrapped_module()
77-
assert not record
78-
79-
8048
@pytest.mark.parametrize(
8149
"inp,expected", [
8250
[torch.tensor(1.0), torch.tensor([1.0])],

tests/test_profiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,10 @@ def test_advanced_profiler_describe(tmpdir, advanced_profiler):
174174
# record at least one event
175175
with advanced_profiler.profile("test"):
176176
pass
177-
# log to stdout and print to file
177+
# logs to output file
178178
advanced_profiler.describe()
179+
# ensures file is flushed before reading
180+
advanced_profiler.output_file.close()
179181
data = Path(advanced_profiler.output_fname).read_text()
180182
assert len(data) > 0
181183

tests/trainer/test_trainer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,8 +1548,10 @@ def test_pytorch_profiler_describe(pytorch_profiler):
15481548
with pytorch_profiler.profile("test_step"):
15491549
pass
15501550

1551-
# log to stdout and print to file
1551+
# logs to output file
15521552
pytorch_profiler.describe()
1553+
# ensures file is flushed before reading
1554+
pytorch_profiler.output_file.close()
15531555
data = Path(pytorch_profiler.output_fname).read_text()
15541556
assert len(data) > 0
15551557

0 commit comments

Comments
 (0)