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

[Feature] Add typehint to mmdet3d/models/backbones. #2464

Merged
merged 18 commits into from
May 11, 2023

Conversation

Lum1104
Copy link
Contributor

@Lum1104 Lum1104 commented Apr 25, 2023

Motivation

Add typehint to the code and make it more readable.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Apr 25, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 65.97% and project coverage change: +0.03 🎉

Comparison is base (b4b9af6) 47.14% compared to head (4194e42) 47.17%.

❗ Current head 4194e42 differs from pull request most recent head ae2975e. Consider uploading reports for the commit ae2975e to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2464      +/-   ##
===========================================
+ Coverage    47.14%   47.17%   +0.03%     
===========================================
  Files          276      276              
  Lines        22979    23032      +53     
  Branches      3569     3582      +13     
===========================================
+ Hits         10833    10866      +33     
- Misses       11464    11484      +20     
  Partials       682      682              
Flag Coverage Δ
unittests 47.17% <65.97%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
mmdet3d/apis/inference.py 14.45% <0.00%> (-0.18%) ⬇️
mmdet3d/datasets/transforms/loading.py 44.91% <ø> (ø)
mmdet3d/datasets/transforms/transforms_3d.py 40.09% <0.00%> (-0.13%) ⬇️
mmdet3d/models/decode_heads/cylinder3d_head.py 51.35% <ø> (ø)
mmdet3d/models/decode_heads/minkunet_head.py 50.00% <0.00%> (ø)
mmdet3d/structures/bbox_3d/utils.py 78.57% <ø> (ø)
mmdet3d/utils/setup_env.py 81.81% <ø> (ø)
mmdet3d/visualization/local_visualizer.py 33.44% <0.00%> (-0.23%) ⬇️
...t3d/models/data_preprocessors/data_preprocessor.py 31.46% <9.09%> (+0.16%) ⬆️
mmdet3d/engine/hooks/visualization_hook.py 58.02% <37.50%> (-11.84%) ⬇️
... and 10 more

... and 1 file with indirect coverage changes

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

mmdet3d/models/backbones/base_pointnet.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/base_pointnet.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Xiangxu-0103 Xiangxu-0103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use more standardized and appropriate typehints, you can take other modules as references.

mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
Lum1104 and others added 12 commits April 26, 2023 10:37
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
Co-authored-by: Xiang Xu <xuxiang0103@gmail.com>
mmdet3d/models/backbones/base_pointnet.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dgcnn.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/dla.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/second.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/second.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/second.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/second.py Outdated Show resolved Hide resolved
mmdet3d/structures/bbox_3d/utils.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/multi_backbone.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/multi_backbone.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/multi_backbone.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/nostem_regnet.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/pointnet2_sa_ssg.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/pointnet2_sa_ssg.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/multi_backbone.py Outdated Show resolved Hide resolved
mmdet3d/models/backbones/nostem_regnet.py Outdated Show resolved Hide resolved
@Lum1104 Lum1104 changed the title [Feature] Add typehint. [Feature] Add typehint to mmdet3d/models/backbones. May 8, 2023
@JingweiZhang12 JingweiZhang12 merged commit d99dbce into open-mmlab:dev-1.x May 11, 2023
11 of 15 checks passed
@Lum1104 Lum1104 deleted the Lum1104/add_typehint branch May 11, 2023 02:52
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.

None yet

6 participants