|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 | """Test deprecated functionality which will be removed in v1.10.0."""
|
15 |
| -from re import escape |
16 | 15 | from unittest import mock
|
17 | 16 |
|
18 | 17 | import numpy
|
|
30 | 29 | from pytorch_lightning.cli import LightningCLI
|
31 | 30 | from pytorch_lightning.core.mixins.device_dtype_mixin import DeviceDtypeModuleMixin
|
32 | 31 | from pytorch_lightning.demos.boring_classes import BoringModel, RandomDataset
|
33 |
| -from pytorch_lightning.lite import LightningLite |
34 | 32 | from pytorch_lightning.overrides import LightningDistributedModule, LightningParallelModule
|
35 | 33 | from pytorch_lightning.overrides.base import unwrap_lightning_module
|
36 | 34 | from pytorch_lightning.overrides.fairscale import LightningShardedDataParallel, unwrap_lightning_module_sharded
|
@@ -269,26 +267,6 @@ def test_v1_10_deprecated_accelerator_setup_environment_method():
|
269 | 267 | CPUAccelerator().setup_environment(torch.device("cpu"))
|
270 | 268 |
|
271 | 269 |
|
272 |
| -class EmptyLite(LightningLite): |
273 |
| - def run(self): |
274 |
| - pass |
275 |
| - |
276 |
| - |
277 |
| -def test_lite_convert_deprecated_gpus_argument(cuda_count_2): |
278 |
| - with pytest.deprecated_call(match=escape("Setting `Lite(gpus=2)` is deprecated in v1.8.0")): |
279 |
| - lite = EmptyLite(gpus=2) |
280 |
| - assert isinstance(lite._accelerator, LiteCUDAAccelerator) |
281 |
| - assert lite._connector._parallel_devices == [torch.device("cuda", 0), torch.device("cuda", 1)] |
282 |
| - |
283 |
| - |
284 |
| -@RunIf(skip_windows=True) |
285 |
| -def test_lite_convert_deprecated_tpus_argument(tpu_available): |
286 |
| - with pytest.deprecated_call(match=escape("Setting `Lite(tpu_cores=8)` is deprecated in v1.8.0")): |
287 |
| - lite = EmptyLite(tpu_cores=8) |
288 |
| - assert isinstance(lite._accelerator, LiteTPUAccelerator) |
289 |
| - assert lite._connector._parallel_devices == list(range(8)) |
290 |
| - |
291 |
| - |
292 | 270 | @pytest.mark.parametrize(
|
293 | 271 | ["name", "value"],
|
294 | 272 | [("save_config_filename", "config.yaml"), ("save_config_overwrite", False), ("save_config_multifile", False)],
|
|
0 commit comments