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

Modify codes about version info #189

Merged
merged 9 commits into from
Sep 18, 2020
Merged

Conversation

dreamerlin
Copy link
Collaborator

@dreamerlin dreamerlin commented Sep 17, 2020

This PR modifies codes related with some version information.

  1. Remove git hash in __version__.
  2. Check mmcv version.

@dreamerlin dreamerlin added WIP work in progress and removed WIP work in progress labels Sep 17, 2020
@dreamerlin dreamerlin changed the title Add git hash in __version__ Remove git hash in __version__ Sep 17, 2020
@dreamerlin dreamerlin changed the title Remove git hash in __version__ Remove git hash in __version__ and check mmcv version Sep 17, 2020
mmaction/__init__.py Outdated Show resolved Hide resolved
@dreamerlin dreamerlin changed the title Remove git hash in __version__ and check mmcv version Modify codes about version info Sep 17, 2020
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #189 into master will decrease coverage by 0.05%.
The diff coverage is 69.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
- Coverage   85.87%   85.81%   -0.06%     
==========================================
  Files          77       78       +1     
  Lines        4849     4871      +22     
  Branches      765      768       +3     
==========================================
+ Hits         4164     4180      +16     
- Misses        559      564       +5     
- Partials      126      127       +1     
Flag Coverage Δ
#unittests 85.81% <69.56%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
mmaction/utils/collect_env.py 46.15% <60.00%> (+12.82%) ⬆️
mmaction/version.py 61.53% <61.53%> (ø)
mmaction/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a113052...52276da. Read the comment docs.

mmaction/__init__.py Outdated Show resolved Hide resolved
tools/train.py Outdated Show resolved Hide resolved
@innerlee
Copy link
Contributor

CU-4dnmw1

@hellock
Copy link
Member

hellock commented Sep 18, 2020

Task linked: CU-4dnmw1 MMAction2

@hellock
Copy link
Member

hellock commented Sep 18, 2020

Task linked: CU-4dnmxx MMAction2

NUM_HASHES = 7


def get_short_git_hash(num_hashes=7):
Copy link
Contributor

Choose a reason for hiding this comment

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

can this function be moved to mmcv?

Copy link
Contributor

Choose a reason for hiding this comment

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

let's do it in a separate pr

Copy link
Contributor

Choose a reason for hiding this comment

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

cc. @hellock

short_version = __version__


def parse_version_info(version_str):
Copy link
Contributor

Choose a reason for hiding this comment

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

this should also go to mmcv

Copy link
Contributor

Choose a reason for hiding this comment

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

cc. @hellock

@innerlee innerlee merged commit f30ede3 into open-mmlab:master Sep 18, 2020

import mmaction

NUM_HASHES = 7
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not needed any more


def collect_env():
env_info = collect_basic_env()
env_info['MMAction2'] = mmaction.__version__
env_info['MMAction2'] = (
mmaction.__version__ + '+' + get_short_git_hash(NUM_HASHES))
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@dreamerlin dreamerlin deleted the hash branch September 26, 2020 06:59
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

3 participants