Skip to content

Commit 40baa04

Browse files
awaelchlicarmocca
authored andcommitted
Lite: Remove legacy code (#15953)
1 parent 67f1d10 commit 40baa04

File tree

6 files changed

+7
-426
lines changed

6 files changed

+7
-426
lines changed

src/pytorch_lightning/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

77

8+
## [fabricLaunchPLVersion] - 202Y-MM-DD
9+
10+
### Removed
11+
12+
- Removed the `pytorch_lightning.lite` module in favor of `lightning_fabric` ([#15953](https://github.com/Lightning-AI/lightning/pull/15953))
13+
14+
815
## [unreleased] - 202Y-MM-DD
916

1017
### Added

src/pytorch_lightning/lite/__init__.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/pytorch_lightning/lite/lite.py

Lines changed: 0 additions & 308 deletions
This file was deleted.

tests/tests_pytorch/deprecated_api/test_remove_1-10.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
"""Test deprecated functionality which will be removed in v1.10.0."""
15-
from re import escape
1615
from unittest import mock
1716

1817
import numpy
@@ -30,7 +29,6 @@
3029
from pytorch_lightning.cli import LightningCLI
3130
from pytorch_lightning.core.mixins.device_dtype_mixin import DeviceDtypeModuleMixin
3231
from pytorch_lightning.demos.boring_classes import BoringModel, RandomDataset
33-
from pytorch_lightning.lite import LightningLite
3432
from pytorch_lightning.overrides import LightningDistributedModule, LightningParallelModule
3533
from pytorch_lightning.overrides.base import unwrap_lightning_module
3634
from pytorch_lightning.overrides.fairscale import LightningShardedDataParallel, unwrap_lightning_module_sharded
@@ -269,26 +267,6 @@ def test_v1_10_deprecated_accelerator_setup_environment_method():
269267
CPUAccelerator().setup_environment(torch.device("cpu"))
270268

271269

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-
292270
@pytest.mark.parametrize(
293271
["name", "value"],
294272
[("save_config_filename", "config.yaml"), ("save_config_overwrite", False), ("save_config_multifile", False)],

tests/tests_pytorch/lite/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)