Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pytorch_lightning/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Removed the deprecated `Trainer.{validated,tested,predicted}_ckpt_path` ([#14897](https://github.com/Lightning-AI/lightning/pull/14897))

- Removed the deprecated `device_stats_monitor_prefix_metric_keys` ([#14890](https://github.com/Lightning-AI/lightning/pull/14890))


### Fixed

Expand Down
9 changes: 0 additions & 9 deletions src/pytorch_lightning/callbacks/device_stats_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,3 @@ def on_train_batch_end(

def _prefix_metric_keys(metrics_dict: Dict[str, float], prefix: str, separator: str) -> Dict[str, float]:
return {prefix + separator + k: v for k, v in metrics_dict.items()}


def prefix_metric_keys(metrics_dict: Dict[str, float], prefix: str) -> Dict[str, float]:
rank_zero_deprecation(
"`pytorch_lightning.callbacks.device_stats_monitor.prefix_metrics`"
" is deprecated in v1.6 and will be removed in v1.8."
)
sep = ""
return _prefix_metric_keys(metrics_dict, prefix, sep)
7 changes: 0 additions & 7 deletions tests/tests_pytorch/deprecated_api/test_remove_1-8.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ def on_init_end(self, trainer):
trainer.validate(model)


def test_v_1_8_0_deprecated_device_stats_monitor_prefix_metric_keys():
from pytorch_lightning.callbacks.device_stats_monitor import prefix_metric_keys

with pytest.deprecated_call(match="in v1.6 and will be removed in v1.8"):
prefix_metric_keys({"foo": 1.0}, "bar")


def test_v1_8_0_remove_on_batch_start_end(tmpdir):
class TestCallback(Callback):
def on_batch_start(self, *args, **kwargs):
Expand Down