Skip to content

Commit b5450de

Browse files
author
SeanNaren
committed
See if we can enable deepspeed tests
1 parent bd2a53a commit b5450de

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

tests/plugins/test_deepspeed_plugin.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def test_deepspeed_defaults(tmpdir):
181181
assert isinstance(plugin.config["zero_optimization"], dict)
182182

183183

184-
@RunIf(min_gpus=1, deepspeed=True, special=True)
185-
def test_invalid_deepspeed_defaults_no_precision(dist_initialized_mock, tmpdir):
184+
@RunIf(min_gpus=1, deepspeed=True)
185+
def test_invalid_deepspeed_defaults_no_precision(tmpdir):
186186
"""Test to ensure that using defaults, if precision is not set to 16, we throw an exception."""
187187
model = BoringModel()
188188
trainer = Trainer(
@@ -196,7 +196,7 @@ def test_invalid_deepspeed_defaults_no_precision(dist_initialized_mock, tmpdir):
196196
trainer.fit(model)
197197

198198

199-
@RunIf(min_gpus=1, deepspeed=True, special=True)
199+
@RunIf(min_gpus=1, deepspeed=True)
200200
def test_warn_deepspeed_override_backward(tmpdir):
201201
"""Test to ensure that if the backward hook in the LightningModule is overridden, we throw a warning."""
202202

@@ -217,7 +217,7 @@ def backward(self, loss: Tensor, optimizer: Optimizer, optimizer_idx: int, *args
217217
trainer.fit(model)
218218

219219

220-
@RunIf(min_gpus=1, deepspeed=True, special=True)
220+
@RunIf(min_gpus=1, deepspeed=True)
221221
def test_deepspeed_run_configure_optimizers(tmpdir):
222222
"""Test end to end that deepspeed works with defaults (without ZeRO as that requires compilation),
223223
whilst using configure_optimizers for optimizers and schedulers."""
@@ -247,7 +247,7 @@ def on_train_start(self) -> None:
247247
_assert_save_model_is_equal(model, tmpdir, trainer)
248248

249249

250-
@RunIf(min_gpus=1, deepspeed=True, special=True)
250+
@RunIf(min_gpus=1, deepspeed=True)
251251
def test_deepspeed_config(tmpdir, deepspeed_zero_config):
252252
"""
253253
Test to ensure deepspeed works correctly when passed a DeepSpeed config object including optimizers/schedulers
@@ -281,7 +281,7 @@ def on_train_start(self) -> None:
281281
_assert_save_model_is_equal(model, tmpdir, trainer)
282282

283283

284-
@RunIf(min_gpus=1, deepspeed=True, special=True)
284+
@RunIf(min_gpus=1, deepspeed=True)
285285
def test_deepspeed_custom_precision_params(tmpdir):
286286
"""Ensure if we modify the FP16 parameters via the DeepSpeedPlugin, the deepspeed config contains these changes."""
287287

@@ -302,7 +302,7 @@ def on_train_start(self) -> None:
302302
trainer.fit(model)
303303

304304

305-
@RunIf(min_gpus=1, deepspeed=True, special=True)
305+
@RunIf(min_gpus=1, deepspeed=True)
306306
def test_deepspeed_assert_config_zero_offload_disabled(tmpdir, deepspeed_zero_config):
307307
"""Ensure if we use a config and turn off cpu_offload, that this is set to False within the config."""
308308

tests/special_tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ export PL_RUNNING_SPECIAL_TESTS=1
1717
DEFAULTS="-m coverage run --source pytorch_lightning -a -m pytest --verbose --capture=no"
1818
python ${DEFAULTS} tests/trainer/optimization/test_manual_optimization.py::test_step_with_optimizer_closure_with_different_frequencies_ddp
1919
python ${DEFAULTS} tests/models/test_sync_batchnorm.py::test_sync_batchnorm_ddp
20-
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_warn_deepspeed_override_backward
21-
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_deepspeed_run_configure_optimizers
22-
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_deepspeed_config
23-
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_deepspeed_custom_precision_params
24-
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_deepspeed_assert_config_zero_offload_disabled
2520
python ${DEFAULTS} tests/plugins/test_deepspeed_plugin.py::test_deepspeed_multigpu
2621
python ${DEFAULTS} tests/plugins/test_rpc_plugin.py::test_rpc_function_calls_ddp
2722
python ${DEFAULTS} tests/plugins/test_rpc_sequential_plugin.py::test_rpc_sequential_plugin_manual

0 commit comments

Comments
 (0)