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

Rename collections.py to metrics_collections.py to avoid clashing with collections package #695

Merged
merged 3 commits into from
Dec 28, 2021

Conversation

tkupek
Copy link
Contributor

@tkupek tkupek commented Dec 28, 2021

What does this PR do?

Debugging the current version of the master does not work for me, as the torchmetrics collections.py clashes with the Python default collections package and I get this error:

ImportError: cannot import name 'OrderedDict' from partially initialized module 'collections' (most likely due to a circular import) (...\torchmetrics\collections.py)

I suggest to rename it to metric_collections.py to avoid this problem.

Before submitting

  • Was this discussed/approved 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 🙃

@codecov
Copy link

codecov bot commented Dec 28, 2021

Codecov Report

Merging #695 (4fac557) into master (c741149) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #695   +/-   ##
=====================================
  Coverage      95%    95%           
=====================================
  Files         166    166           
  Lines        6413   6413           
=====================================
+ Hits         6103   6105    +2     
+ Misses        310    308    -2     

@mergify mergify bot added the ready label Dec 28, 2021
@Borda Borda added the enhancement New feature or request label Dec 28, 2021
@Borda Borda enabled auto-merge (squash) December 28, 2021 19:24
@Borda Borda merged commit 3eb172a into Lightning-AI:master Dec 28, 2021
Borda pushed a commit to mathemusician/metrics that referenced this pull request Jan 10, 2022
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants