diff --git a/CHANGELOG.md b/CHANGELOG.md index 704c9618167..8b6887c3823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added support for calculating segmentation quality and recognition quality in `PanopticQuality` metric ([#2381](https://github.com/Lightning-AI/torchmetrics/pull/2381)) +- Added `pretty-errors` for improving error prints ([#2431](https://github.com/Lightning-AI/torchmetrics/pull/2431)) + + - Added support for `torch.float` weighted networks for FID and KID calculations ([#2483](https://github.com/Lightning-AI/torchmetrics/pull/2483)) diff --git a/requirements/base.txt b/requirements/base.txt index eb47b30f778..5b52bf8cbca 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,3 +6,4 @@ packaging >17.1 torch >=1.10.0, <2.3.0 typing-extensions; python_version < '3.9' lightning-utilities >=0.8.0, <0.12.0 +pretty-errors ==1.2.25 diff --git a/src/torchmetrics/__init__.py b/src/torchmetrics/__init__.py index b1549dfaf8b..c1bff7ca459 100644 --- a/src/torchmetrics/__init__.py +++ b/src/torchmetrics/__init__.py @@ -14,6 +14,9 @@ _PACKAGE_ROOT = os.path.dirname(__file__) _PROJECT_ROOT = os.path.dirname(_PACKAGE_ROOT) +if package_available("pretty_errors"): + import pretty_errors # noqa: F401 + if package_available("PIL"): import PIL