Skip to content

Commit

Permalink
Remove the deprecated pytorch_lightning.profiler module (#16359)
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca authored and lantiga committed Jan 19, 2023
1 parent 5d648e4 commit 1493359
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 105 deletions.
2 changes: 2 additions & 0 deletions src/pytorch_lightning/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Removed the deprecated `resume_from_checkpoint` Trainer argument ([#16167](https://github.com/Lightning-AI/lightning/pull/16167))

- Removed the deprecated `pytorch_lightning.profiler` module ([#16359](https://github.com/Lightning-AI/lightning/pull/16359))

- Removed the deprecated automatic GPU selection ([#16184](https://github.com/Lightning-AI/lightning/pull/16184))
* Removed the `Trainer(auto_select_gpus=...)` argument
* Removed the `pytorch_lightning.tuner.auto_gpu_select.{pick_single_gpu,pick_multiple_gpus}` functions
Expand Down
86 changes: 0 additions & 86 deletions src/pytorch_lightning/profiler/__init__.py

This file was deleted.

19 changes: 0 additions & 19 deletions tests/tests_pytorch/deprecated_api/test_remove_2-0.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from lightning_utilities.test.warning import no_warning_call
from torch.utils.data import DataLoader

import pytorch_lightning.profiler as profiler
from pytorch_lightning import Trainer
from pytorch_lightning.accelerators.cpu import CPUAccelerator
from pytorch_lightning.cli import LightningCLI
Expand Down Expand Up @@ -320,21 +319,3 @@ def test_v1_8_1_deprecated_rank_zero_only():

with pytest.deprecated_call(match="rank_zero_only` has been deprecated in v1.8.1"):
rank_zero_only(lambda: None)


@pytest.mark.parametrize(
"cls",
[
profiler.AdvancedProfiler,
profiler.PassThroughProfiler,
profiler.PyTorchProfiler,
profiler.SimpleProfiler,
pytest.param(profiler.XLAProfiler, marks=RunIf(tpu=True)),
],
)
def test_profiler_classes_deprecated_warning(cls):
with pytest.deprecated_call(
match=f"profiler.{cls.__name__}` is deprecated in v1.9.0 and will be removed in v2.0.0."
f" Use .*profilers.{cls.__name__}` class instead."
):
cls()

0 comments on commit 1493359

Please sign in to comment.