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 mmdeploy.version_info #2215

Merged
merged 3 commits into from
Jul 3, 2023
Merged

fix mmdeploy.version_info #2215

merged 3 commits into from
Jul 3, 2023

Conversation

xiabo123
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

fix mmdeploy.version_info
image

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

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 tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Jun 27, 2023

CLA assistant check
All committers have signed the CLA.

mmdeploy/__init__.py Outdated Show resolved Hide resolved
mmdeploy/__init__.py Outdated Show resolved Hide resolved
@RunningLeon RunningLeon added the enhancement New feature or request label Jun 27, 2023
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 72.72% and project coverage change: -0.21 ⚠️

Comparison is base (a8775d2) 49.81% compared to head (c64da3d) 49.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2215      +/-   ##
==========================================
- Coverage   49.81%   49.61%   -0.21%     
==========================================
  Files         341      341              
  Lines       13033    13134     +101     
  Branches     1910     1927      +17     
==========================================
+ Hits         6493     6516      +23     
- Misses       6089     6158      +69     
- Partials      451      460       +9     
Flag Coverage Δ
unittests 49.61% <72.72%> (-0.21%) ⬇️

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

Impacted Files Coverage Δ
...mmseg/models/segmentors/cascade_encoder_decoder.py 18.18% <0.00%> (+1.51%) ⬆️
mmdeploy/codebase/mmseg/models/segmentors/base.py 75.00% <66.66%> (-9.22%) ⬇️
mmdeploy/__init__.py 45.45% <100.00%> (ø)
...odebase/mmseg/models/segmentors/encoder_decoder.py 100.00% <100.00%> (+12.50%) ⬆️
mmdeploy/mmcv/ops/nms.py 58.80% <100.00%> (-2.13%) ⬇️

... and 15 files 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.

@RunningLeon
Copy link
Collaborator

@xiabo123 could you fix the lint error by running pip install pre-commit && pre-commit install && pre-commit run --all-files.

@xiabo123
Copy link
Contributor Author

ok

@xiabo123
Copy link
Contributor Author

@RunningLeon Have you encountered the following problems? During Flake8, the version number of mccabe was always incorrect. Both 0.6.0 and 0.6.1 cannot be installed in practice.
3b7e5231c69f4a9c62821ad671142cb

@xiabo123
Copy link
Contributor Author

@RunningLeon
from .version import __version__, version_info # noqa F401
I'm very sorry, the modification 'version_info' was not called in 'mmdeploy' and cannot be checked by 'isort'.
I attempted to make modifications in our call layer.
from mmdeploy.version import version_info
We apologize for any inconvenience caused.

@RunningLeon
Copy link
Collaborator

RunningLeon commented Jun 30, 2023

@xiabo123 maybe you could use here to parse the package version. Cause not all packages provide version_info. This PR could be closed if this works for you.

import mmdeploy
from packaging import version # pip install packaging if not installed
v = version.parse(mmdeploy.__version__)
print(v.major, v.minor, v.micro)

@xiabo123
Copy link
Contributor Author

@RunningLeon OK,thank you.

@RunningLeon RunningLeon merged commit ae381c8 into open-mmlab:main Jul 3, 2023
25 of 26 checks passed
Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants