[Enhancement]Support broadcast_object_list in multi-machines & support Searcher running in single GPU#153
Merged
pppppM merged 2 commits intoopen-mmlab:dev_v0.4.0from May 4, 2022
Conversation
Codecov Report
@@ Coverage Diff @@
## dev_v0.4.0 #153 +/- ##
==============================================
- Coverage 66.17% 65.51% -0.66%
==============================================
Files 92 93 +1
Lines 3376 3428 +52
Branches 615 630 +15
==============================================
+ Hits 2234 2246 +12
- Misses 1040 1080 +40
Partials 102 102
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Collaborator
|
The modification of |
pppppM
reviewed
Apr 29, 2022
| object_list[i] = _tensor_to_object(obj_view, obj_size) | ||
|
|
||
|
|
||
| def broadcast_object_list(data: List[Any], |
Collaborator
There was a problem hiding this comment.
A warning needs to be added here
pppppM
approved these changes
May 4, 2022
pppppM
added a commit
that referenced
this pull request
May 4, 2022
* [Enhance] Add extra dataloader settings in configs (#141) * [Docs] fix md link failure in docs (#142) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix md link failure in docs * [Docs] add myst_parser to extensions in conf.py * [Docs] delete the deprecated recommonmark * [Docs] delete recommandmark from conf.py * [Docs] fix md link failure and lint failture * [Fix] Fix seed error in mmseg/train_seg.py and typos in train.md (#152) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix cwd docs and fix seed in #151 * delete readme of cream * [Enhancement]Support broadcast_object_list in multi-machines & support Searcher running in single GPU (#153) * broadcast_object_list support multi-machines * add userwarning * [Fix] Fix configs (#149) * fix configs * fix spos configs * fix readme * replace the official mutable_cfg with the mutable_cfg searched by ourselves * update https prefix Co-authored-by: pppppM <gjf_mail@126.com> * [BUG]Support to prune models containing GroupNorm or InstanceNorm. (#144) * suport GN and IN * test pruner * limit pytorch version * fix pytest * throw an error when tracing groupnorm with torch version under 1.6.0 Co-authored-by: caoweihan <caoweihan@sensetime.com> * Bump version to 0.3.1 Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com> Co-authored-by: PJDong <1115957667@qq.com> Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com> Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com> Co-authored-by: caoweihan <caoweihan@sensetime.com>
pppppM
added a commit
to pppppM/mmrazor
that referenced
this pull request
Jul 15, 2022
* [Enhance] Add extra dataloader settings in configs (open-mmlab#141) * [Docs] fix md link failure in docs (open-mmlab#142) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix md link failure in docs * [Docs] add myst_parser to extensions in conf.py * [Docs] delete the deprecated recommonmark * [Docs] delete recommandmark from conf.py * [Docs] fix md link failure and lint failture * [Fix] Fix seed error in mmseg/train_seg.py and typos in train.md (open-mmlab#152) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix cwd docs and fix seed in open-mmlab#151 * delete readme of cream * [Enhancement]Support broadcast_object_list in multi-machines & support Searcher running in single GPU (open-mmlab#153) * broadcast_object_list support multi-machines * add userwarning * [Fix] Fix configs (open-mmlab#149) * fix configs * fix spos configs * fix readme * replace the official mutable_cfg with the mutable_cfg searched by ourselves * update https prefix Co-authored-by: pppppM <gjf_mail@126.com> * [BUG]Support to prune models containing GroupNorm or InstanceNorm. (open-mmlab#144) * suport GN and IN * test pruner * limit pytorch version * fix pytest * throw an error when tracing groupnorm with torch version under 1.6.0 Co-authored-by: caoweihan <caoweihan@sensetime.com> * Bump version to 0.3.1 Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com> Co-authored-by: PJDong <1115957667@qq.com> Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com> Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com> Co-authored-by: caoweihan <caoweihan@sensetime.com>
pppppM
added a commit
to pppppM/mmrazor
that referenced
this pull request
Jul 15, 2022
* [Enhance] Add extra dataloader settings in configs (open-mmlab#141) * [Docs] fix md link failure in docs (open-mmlab#142) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix md link failure in docs * [Docs] add myst_parser to extensions in conf.py * [Docs] delete the deprecated recommonmark * [Docs] delete recommandmark from conf.py * [Docs] fix md link failure and lint failture * [Fix] Fix seed error in mmseg/train_seg.py and typos in train.md (open-mmlab#152) * [Docs] update Cream readme * delete 'readme.md' in model_zoo.md * fix cwd docs and fix seed in open-mmlab#151 * delete readme of cream * [Enhancement]Support broadcast_object_list in multi-machines & support Searcher running in single GPU (open-mmlab#153) * broadcast_object_list support multi-machines * add userwarning * [Fix] Fix configs (open-mmlab#149) * fix configs * fix spos configs * fix readme * replace the official mutable_cfg with the mutable_cfg searched by ourselves * update https prefix Co-authored-by: pppppM <gjf_mail@126.com> * [BUG]Support to prune models containing GroupNorm or InstanceNorm. (open-mmlab#144) * suport GN and IN * test pruner * limit pytorch version * fix pytest * throw an error when tracing groupnorm with torch version under 1.6.0 Co-authored-by: caoweihan <caoweihan@sensetime.com> * Bump version to 0.3.1 Co-authored-by: qiufeng <44188071+wutongshenqiu@users.noreply.github.com> Co-authored-by: PJDong <1115957667@qq.com> Co-authored-by: humu789 <88702197+humu789@users.noreply.github.com> Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com> Co-authored-by: caoweihan <caoweihan@sensetime.com>
humu789
pushed a commit
to humu789/mmrazor
that referenced
this pull request
Feb 13, 2023
* Add doc * Remove spaces * sovle comments * Resolve comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
fix init bug when running in single GPU #42
fix broadcast_object_list bug, which can not be executed in multi-machines.
Modification
Refactor
broadcast_object_listto be consistent with pytorchBC-breaking (Optional)
broad_object_listis without return value.broad_object_list's parameter changed:object_list->dataUse cases (Optional)
Examples:
>>> import torch
>>> import mmrazor.core.utils as dist
>>> # non-distributed environment
>>> data = ['foo', 12, {1: 2}]
>>> dist.broadcast_object_list(data)
>>> data
['foo', 12, {1: 2}]
>>> # distributed environment
>>> # We have 2 process groups, 2 ranks.
>>> if dist.get_rank() == 0:
>>> # Assumes world_size of 3.
>>> data = ["foo", 12, {1: 2}] # any picklable object
>>> else:
>>> data = [None, None, None]
>>> dist.broadcast_object_list(data)
>>> data
["foo", 12, {1: 2}] # Rank 0
["foo", 12, {1: 2}] # Rank 1