ViCCo-Group / thingsvision

Python package for extracting representations from state-of-the-art computer vision models
https://vicco-group.github.io/thingsvision/
MIT License
157 stars 21 forks source link

Create unit tests for `get_extractor_from_model` #132

Closed andropar closed 1 year ago

andropar commented 1 year ago

This PR adds a couple of simple unit tests for the get_extractor_from_model helper function (Issue #88 ). @LukasMut please let me know if I need to add more / different tests, I'm not that used to writing them tbh.

codecov-commenter commented 1 year ago

Codecov Report

Base: 74.71% // Head: 75.48% // Increases project coverage by +0.77% :tada:

Coverage data is based on head (ccfad80) compared to base (944efb9). Patch coverage: 66.66% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #132 +/- ## ========================================== + Coverage 74.71% 75.48% +0.77% ========================================== Files 25 25 Lines 1226 1232 +6 Branches 177 178 +1 ========================================== + Hits 916 930 +14 + Misses 259 251 -8 Partials 51 51 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `75.48% <66.66%> (+0.77%)` | :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=ViCCo-Group#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group) | Coverage Δ | | |---|---|---| | [thingsvision/core/extraction/helpers.py](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#diff-dGhpbmdzdmlzaW9uL2NvcmUvZXh0cmFjdGlvbi9oZWxwZXJzLnB5) | `78.78% <50.00%> (+7.65%)` | :arrow_up: | | [thingsvision/core/extraction/torch.py](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#diff-dGhpbmdzdmlzaW9uL2NvcmUvZXh0cmFjdGlvbi90b3JjaC5weQ==) | `76.13% <75.00%> (+0.55%)` | :arrow_up: | | [thingsvision/core/extraction/tensorflow.py](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#diff-dGhpbmdzdmlzaW9uL2NvcmUvZXh0cmFjdGlvbi90ZW5zb3JmbG93LnB5) | `85.71% <100.00%> (+2.73%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.