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

[Fix] Fix warning with torch.meshgrid. #860

Merged
merged 3 commits into from
Sep 30, 2022

Conversation

pallgeuer
Copy link

@pallgeuer pallgeuer commented May 30, 2022

Motivation

torch.meshgrid() has started raising a warning when not called with an explicit indexing parameter:
https://pytorch.org/docs/stable/generated/torch.meshgrid.html

Modification

Provide indexing='ij' to all calls to torch.meshgrid that don't already specify indexing.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@CLAassistant
Copy link

CLAassistant commented May 30, 2022

CLA assistant check
All committers have signed the CLA.

@pallgeuer
Copy link
Author

Refer to open-mmlab/mmdetection#8090 (comment) for discussion on PyTorch version support of torch.meshgrid.

@pallgeuer
Copy link
Author

I have updated the PR with the same solution as used for mmpose and mmdet. This should be ready to merge now.

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Base: 86.80% // Head: 85.39% // Decreases project coverage by -1.41% ⚠️

Coverage data is based on head (c106dc1) compared to base (877ea30).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #860      +/-   ##
==========================================
- Coverage   86.80%   85.39%   -1.42%     
==========================================
  Files         130      134       +4     
  Lines        8571     8775     +204     
  Branches     1478     1435      -43     
==========================================
+ Hits         7440     7493      +53     
- Misses        909     1058     +149     
- Partials      222      224       +2     
Flag Coverage Δ
unittests 85.33% <ø> (-1.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcls/utils/setup_env.py 95.45% <0.00%> (-4.55%) ⬇️
mmcls/datasets/builder.py 83.78% <0.00%> (-4.06%) ⬇️
mmcls/apis/train.py 15.38% <0.00%> (-0.53%) ⬇️
mmcls/utils/__init__.py 100.00% <0.00%> (ø)
mmcls/core/hook/__init__.py 100.00% <0.00%> (ø)
mmcls/core/evaluation/__init__.py 100.00% <0.00%> (ø)
mmcls/utils/distribution.py 10.52% <0.00%> (ø)
mmcls/core/hook/wandblogger_hook.py 18.57% <0.00%> (ø)
mmcls/core/evaluation/eval_hooks.py 28.94% <0.00%> (ø)
mmcls/utils/device.py 100.00% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@mzr1996 mzr1996 changed the base branch from master to dev September 30, 2022 06:53
@mzr1996 mzr1996 changed the title Fix warning with torch.meshgrid [Fix] Fix warning with torch.meshgrid. Sep 30, 2022
@mzr1996 mzr1996 merged commit 7dca27d into open-mmlab:dev Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants