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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: cache reference metrics & clean audio tests #2335

Merged
merged 29 commits into from
Feb 27, 2024
Merged

ci: cache reference metrics & clean audio tests #2335

merged 29 commits into from
Feb 27, 2024

Conversation

Borda
Copy link
Member

@Borda Borda commented Jan 30, 2024

What does this PR do?

Resolves #949

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃


📚 Documentation preview 📚: https://torchmetrics--2335.org.readthedocs.build/en/2335/

@Borda Borda added enhancement New feature or request test / CI testing or CI labels Jan 30, 2024
@Borda
Copy link
Member Author

Borda commented Jan 30, 2024

it seems that hashing is not supported by its nature for list or np.ndarray, see:

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Merging #2335 (5d217bd) into master (efb3a25) will decrease coverage by 1%.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #2335    +/-   ##
=======================================
- Coverage      69%     68%    -1%     
=======================================
  Files         307     307            
  Lines       17352   17352            
=======================================
- Hits        11961   11821   -140     
- Misses       5391    5531   +140     

@shaypal5
Copy link

it seems that hashing is not supported by its nature for list or np.ndarray, see:

@Borda, please note you can easily work around this using custom hashing logic, which cachier supports:
https://github.com/python-cachier/cachier?tab=readme-ov-file#working-with-unhashable-arguments

@Borda
Copy link
Member Author

Borda commented Jan 31, 2024

note you can easily work around this using custom hashing logic, which cachier supports

@shaypal5, yes, I saw it but this I believe is quite often the case so it would be beneficial to cover it out of the box (I mean list not numpy.andarray)

@shaypal5
Copy link

note you can easily work around this using custom hashing logic, which cachier supports

@shaypal5, yes, I saw it but this I believe is quite often the case so it would be beneficial to cover it out of the box (I mean list not numpy.andarray)

Cool. As long as you are aware this shouldn't block your use case, I'd love to get contributions by you into cachier!

@mergify mergify bot removed the has conflicts label Feb 27, 2024
@Borda Borda changed the title ci: cache reference metrics [wip] ci: cache reference metrics Feb 27, 2024
@Borda
Copy link
Member Author

Borda commented Feb 27, 2024

An idea bout increasing the testing range, we could move importing the dependency package to the def _reference_XXX(...) function with eventual skip if not imported... that would mean once the reference computed on with feasible configuration (mostly means package and python version compatibility issue) it will be used as part of a cache for remaining configurations.
This would fully cover the suggested improvement mentioned in #949 with minimal engineering overhead 🚀

cc: @SkafteNicki @justusschock @lantiga

@Borda Borda changed the title ci: cache reference metrics ci: cache reference metrics & clean audio tests Feb 27, 2024
@Borda Borda mentioned this pull request Feb 27, 2024
4 tasks
@mergify mergify bot added the ready label Feb 27, 2024
@mergify mergify bot removed the ready label Feb 27, 2024
@mergify mergify bot added the ready label Feb 27, 2024
@Borda Borda merged commit c53ea94 into master Feb 27, 2024
57 checks passed
@Borda Borda deleted the ci/cache-ref branch February 27, 2024 22:05
Borda added a commit that referenced this pull request Mar 16, 2024
* cache reference metrics
* audio
* classif
* regress
* image
* others
* cleaning

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit c53ea94)
Borda added a commit that referenced this pull request Mar 18, 2024
* cache reference metrics
* audio
* classif
* regress
* image
* others
* cleaning

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit c53ea94)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready test / CI testing or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests: Prepare reference scores once for all env. configs
3 participants