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

[Enhance] Add type ints in these files: #2020

Merged
merged 6 commits into from
Jun 2, 2022

Conversation

WINDSKY45
Copy link
Contributor

Modification

Add type hints in these files:
'base_module.py', 'checkpoint.py',
'default_constructor.py',
'dist_utils.py', 'fp16_utils.py',
'log_buffer.py', 'priority.py'.

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

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

Sorry, something went wrong.

Copy link
Collaborator

@HAOCHENYE HAOCHENYE left a comment

Choose a reason for hiding this comment

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

We don't need to add return Type Hints for the __init__ method. If it is added, it should also ensure that the format is uniform

@WINDSKY45
Copy link
Contributor Author

I have fixed them.

@zhouzaida
Copy link
Collaborator

zhouzaida commented May 30, 2022

Please add type hints for following methods:

  • get_dist_info in mmcv/runner/dist_utils.py.
  • clear and clear_output in mmcv/runner/log_buffer.py

@zhouzaida
Copy link
Collaborator

Hi, please resolve conflicts.

WINDSKY45 added 4 commits May 31, 2022 18:02
'base_module.py', 'checkpoint.py',
'default_constructor.py',
'dist_utils.py', 'fp16_utils.py',
'log_buffer.py', 'priority.py'.
Removed the return type of __init__ funcs.
mmcv/runner/dist_utils.py Outdated Show resolved Hide resolved
mmcv/runner/checkpoint.py Outdated Show resolved Hide resolved
mmcv/runner/checkpoint.py Outdated Show resolved Hide resolved

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@zhouzaida zhouzaida merged commit ea0e8cd into open-mmlab:master Jun 2, 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.

None yet

4 participants