Lightning-AI / Lightning-AI/pytorch-lightning
Use `FutureWarning` instead of `DeprecationWarning` for deprecation warning
@puhuk is already working on this.
Since Jan 18, 2022.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
*basically a copy of https://github.com/PyTorchLightning/metrics/issues/744 which was addressed in https://github.com/PyTorchLightning/metrics/pull/749*
---
## 🚀 Feature
see suggestion in https://github.com/PyTorchLightning/metrics/pull/740#discussion_r782088021
### Motivation
most of the deprecations in TM are meant to users not developers
### Pitch
Replace `DeprecationWarning` with `FutureWarning` defined at:
https://github.com/PyTorchLightning/pytorch-lightning/blob/033dba1494a177954e8ca59bc74b1635e83b9efa/pytorch_lightning/utilities/warnings.py#L44
and remove:
https://github.com/PyTorchLightning/pytorch-lightning/blob/033dba1494a177954e8ca59bc74b1635e83b9efa/pytorch_lightning/utilities/warnings.py#L48-L49
### Alternatives
Keep using `DeprecationWarning`.
### Additional context
- **exception `DeprecationWarning`** Base class for warnings about deprecated features when those warnings are **intended for other Python developers**. _Ignored by the default warning filters_, except in the `__main__` module (PEP 565). Enabling the Python Development Mode shows this warning.
- **exception `FutureWarning`** Base class for warnings about deprecated features when those warnings are **intended for end users of applications** that are written in Python.
______________________________________________________________________
#### If you enjoy Lightning, check out our other projects! ⚡
- [**Metrics**](https://github.com/PyTorchLightning/metrics): Machine learning metrics for distributed, scalable PyTorch applications.
- [**Lite**](https://pytorch-lightning.readthedocs.io/en/latest/starter/lightning_lite.html): enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.
- [**Flash**](https://github.com/PyTorchLightning/lightning-flash): The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.
- [**Bolts**](https://github.com/PyTorchLightning/lightning-bolts): Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.
- [**Lightning Transformers**](https://github.com/PyTorchLightning/lightning-transformers): Flexible interface for high-performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.
cc @borda
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.