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] speed up training #181

Merged
merged 3 commits into from
Jan 25, 2022

Conversation

fangyixiao18
Copy link
Collaborator

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

Motivation

To speed up training

Modification

Refer to open-mmlab/mmdetection#6974
modify default_runtime.py, add opencv_num_threads = 0 and mp_start_method = 'fork'
modify tools/train.py

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.

Copy link
Collaborator

@Jiahao000 Jiahao000 left a comment

Choose a reason for hiding this comment

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

Does setup_multi_processes also work for tools/test.py?

@fangyixiao18
Copy link
Collaborator Author

Does setup_multi_processes also work for tools/test.py?

Theoretically, it works. I will revise the code later according to the newest pr of mmdet.

@fangyixiao18
Copy link
Collaborator Author

The update refers to open-mmlab/mmdetection#7036

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #181 (6a6dda0) into master (cc19b34) will increase coverage by 3.84%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
+ Coverage   59.97%   63.82%   +3.84%     
==========================================
  Files          94       95       +1     
  Lines        3388     3411      +23     
  Branches      542      546       +4     
==========================================
+ Hits         2032     2177     +145     
+ Misses       1271     1141     -130     
- Partials       85       93       +8     
Flag Coverage Δ
unittests 63.82% <95.65%> (+3.84%) ⬆️

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

Impacted Files Coverage Δ
mmselfsup/utils/setup_env.py 95.45% <95.45%> (ø)
mmselfsup/utils/__init__.py 100.00% <100.00%> (ø)
mmselfsup/datasets/builder.py 72.41% <0.00%> (+12.06%) ⬆️
mmselfsup/utils/clustering.py 86.45% <0.00%> (+74.83%) ⬆️

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 82fc43a...6a6dda0. Read the comment docs.

@Jiahao000 Jiahao000 merged commit 21d631f into open-mmlab:master Jan 25, 2022
@fangyixiao18 fangyixiao18 deleted the hotfix/save_life branch February 10, 2022 09:37
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