Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimenting with error improvements #2431

Merged
merged 22 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
28978c8
experimenting with error improvements
Borda Mar 5, 2024
925c016
Merge branch 'master' into use-pretty_errors
Borda Mar 18, 2024
836a985
Merge branch 'master' into use-pretty_errors
Borda Mar 19, 2024
e9bdbd9
Merge branch 'master' into use-pretty_errors
Borda Mar 22, 2024
0530f4c
Merge branch 'master' into use-pretty_errors
Borda Mar 25, 2024
cd64d62
Merge branch 'master' into use-pretty_errors
Borda Mar 27, 2024
f716fcc
Merge branch 'master' into use-pretty_errors
Borda Mar 28, 2024
b28d53d
Merge branch 'master' into use-pretty_errors
Borda Mar 28, 2024
791cf0d
chlog
Borda Mar 28, 2024
5fccf1c
Merge branch 'master' into use-pretty_errors
matsumotosan Apr 1, 2024
c887edd
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 2, 2024
29d55e0
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 2, 2024
af0ebe9
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 10, 2024
5eca426
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 10, 2024
53c47ec
Merge branch 'master' into use-pretty_errors
Borda Apr 10, 2024
4b57d86
Merge branch 'master' into use-pretty_errors
Borda Apr 14, 2024
128d3a7
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 15, 2024
a2b2744
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 15, 2024
87b9cf9
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 15, 2024
41f174b
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 15, 2024
ef06770
Merge branch 'master' into use-pretty_errors
mergify[bot] Apr 16, 2024
1b30064
Merge branch 'master' into use-pretty_errors
Borda Apr 16, 2024
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))


### Changed

- Made `__getattr__` and `__setattr__` of `ClasswiseWrapper` more general ([#2424](https://github.com/Lightning-AI/torchmetrics/pull/2424))
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can relax this version constraint in the future?

3 changes: 3 additions & 0 deletions src/torchmetrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like importing torchmetrics now has the effect of changing error messages for all other code. This seems undesirable. Couldn't this be left up to the user? Or the dependency made optional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also seems unmaintained: onelivesleft/PrettyErrors#57

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, check #2527


if package_available("PIL"):
import PIL

Expand Down
Loading