ENSTA-U2IS-AI / torch-uncertainty

Open-source framework for uncertainty and deep learning models in PyTorch :seedling:
https://torch-uncertainty.github.io
Apache License 2.0
223 stars 16 forks source link

:shirt: Extend ruff rules #67

Closed o-laurent closed 8 months ago

o-laurent commented 8 months ago

Add a large number of rules to improve the quality of the code.

To be merged after #63.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (97695b9) 98.45% compared to head (6f02fd8) 98.47%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #67 +/- ## ========================================== + Coverage 98.45% 98.47% +0.02% ========================================== Files 74 74 Lines 3875 3807 -68 Branches 477 471 -6 ========================================== - Hits 3815 3749 -66 + Misses 23 22 -1 + Partials 37 36 -1 ``` | [Flag](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS) | Coverage Δ | | |---|---|---| | [cpu](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS) | `98.47% <97.02%> (+0.02%)` | :arrow_up: | | [pytest](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS) | `98.47% <97.02%> (+0.02%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS) | Coverage Δ | | |---|---|---| | [...rch\_uncertainty/baselines/classification/resnet.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvYmFzZWxpbmVzL2NsYXNzaWZpY2F0aW9uL3Jlc25ldC5weQ==) | `98.14% <100.00%> (ø)` | | | [torch\_uncertainty/baselines/classification/vgg.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvYmFzZWxpbmVzL2NsYXNzaWZpY2F0aW9uL3ZnZy5weQ==) | `97.56% <100.00%> (ø)` | | | [...uncertainty/baselines/classification/wideresnet.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvYmFzZWxpbmVzL2NsYXNzaWZpY2F0aW9uL3dpZGVyZXNuZXQucHk=) | `98.07% <100.00%> (ø)` | | | [torch\_uncertainty/baselines/regression/mlp.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvYmFzZWxpbmVzL3JlZ3Jlc3Npb24vbWxwLnB5) | `100.00% <100.00%> (+2.94%)` | :arrow_up: | | [torch\_uncertainty/datamodules/abstract.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvYWJzdHJhY3QucHk=) | `97.59% <100.00%> (-0.03%)` | :arrow_down: | | [torch\_uncertainty/datamodules/cifar10.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvY2lmYXIxMC5weQ==) | `100.00% <100.00%> (ø)` | | | [torch\_uncertainty/datamodules/cifar100.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvY2lmYXIxMDAucHk=) | `97.64% <100.00%> (ø)` | | | [torch\_uncertainty/datamodules/imagenet.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvaW1hZ2VuZXQucHk=) | `94.11% <100.00%> (-0.06%)` | :arrow_down: | | [torch\_uncertainty/datamodules/mnist.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvbW5pc3QucHk=) | `91.54% <100.00%> (-0.24%)` | :arrow_down: | | [torch\_uncertainty/datamodules/tiny\_imagenet.py](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS#diff-dG9yY2hfdW5jZXJ0YWludHkvZGF0YW1vZHVsZXMvdGlueV9pbWFnZW5ldC5weQ==) | `96.72% <100.00%> (+0.23%)` | :arrow_up: | | ... and [47 more](https://app.codecov.io/gh/ENSTA-U2IS/torch-uncertainty/pull/67?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ENSTA-U2IS) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.