Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature] Support unroll with MMDDP in darts algorithm #210

Merged
merged 15 commits into from
Oct 14, 2022

Conversation

pprp
Copy link
Contributor

@pprp pprp commented Jul 28, 2022

Motivation

  1. Support unroll method in the search phase of darts.
  2. Support DDP training.
  3. Add docstring for darts algorithm.

Results:

image

Docstring coverage:

image

TestCase coverage:

image

@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Base: 82.86% // Head: 84.01% // Increases project coverage by +1.14% 🎉

Coverage data is based on head (3a1a0e7) compared to base (0409adc).
Patch coverage: 97.22% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x     #210      +/-   ##
===========================================
+ Coverage    82.86%   84.01%   +1.14%     
===========================================
  Files          190      190              
  Lines         8336     8496     +160     
  Branches      1298     1327      +29     
===========================================
+ Hits          6908     7138     +230     
+ Misses        1168     1095      -73     
- Partials       260      263       +3     
Flag Coverage Δ
unittests 84.01% <97.22%> (+1.14%) ⬆️

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

Impacted Files Coverage Δ
...or/models/architectures/heads/darts_subnet_head.py 35.71% <ø> (ø)
mmrazor/models/algorithms/nas/darts.py 96.45% <97.20%> (+73.05%) ⬆️
...els/mutables/mutable_module/diff_mutable_module.py 91.90% <100.00%> (+0.57%) ⬆️
mmrazor/structures/subnet/fix_subnet.py 92.30% <0.00%> (+11.53%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pprp pprp force-pushed the refactor_darts_algo branch 2 times, most recently from 3c08bda to 567125c Compare August 1, 2022 15:09
@gaoyang07 gaoyang07 force-pushed the refactor_darts_algo branch from 430e53f to 1ae600d Compare October 14, 2022 07:51
supernet_losses, supernet_log_vars = self.module.parse_losses(
supernet_loss)

# import ipdb; ipdb.set_trace()
Copy link
Contributor

Choose a reason for hiding this comment

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

clear

@sunnyxiaohu sunnyxiaohu merged commit dd51ab8 into open-mmlab:dev-1.x Oct 14, 2022
gaoyang07 pushed a commit to gaoyang07/mmrazor that referenced this pull request Oct 19, 2022
* support unroll in darts

* fix bugs in optimizer; add docstring

* update darts algorithm [untested]

* modify autograd.grad to optim_wrapper.backward

* add amp in train.py; support constructor

* rename mmcls.data to mmcls.structures

* modify darts algo to support apex [not done]

* fix code spell in diff_mutable_module

* modify optim_context of dartsddp

* add testcase for dartsddp

* fix bugs of apex in dartsddp

* standardized the unittest of darts

* adapt new data_preprocessor

* fix ut bugs

* remove unness code

Co-authored-by: gaoyang07 <1546308416@qq.com>
gaoyang07 pushed a commit to gaoyang07/mmrazor that referenced this pull request Oct 19, 2022
* support unroll in darts

* fix bugs in optimizer; add docstring

* update darts algorithm [untested]

* modify autograd.grad to optim_wrapper.backward

* add amp in train.py; support constructor

* rename mmcls.data to mmcls.structures

* modify darts algo to support apex [not done]

* fix code spell in diff_mutable_module

* modify optim_context of dartsddp

* add testcase for dartsddp

* fix bugs of apex in dartsddp

* standardized the unittest of darts

* adapt new data_preprocessor

* fix ut bugs

* remove unness code

Co-authored-by: gaoyang07 <1546308416@qq.com>
humu789 pushed a commit to humu789/mmrazor that referenced this pull request Feb 13, 2023
* [WIP] Refactor v2.0 (open-mmlab#163)

* Refactor backend wrapper

* Refactor mmdet.inference

* Fix

* merge

* refactor utils

* Use deployer and deploy_model to manage pipeline

* Resolve comments

* Add a real inference api function

* rename wrappers

* Set execute to private method

* Rename deployer deploy_model

* Refactor task

* remove type hint

* lint

* Resolve comments

* resolve comments

* lint

* docstring

* [Fix]: Fix bugs in details in refactor branch (open-mmlab#192)

* [WIP] Refactor v2.0 (open-mmlab#163)

* Refactor backend wrapper

* Refactor mmdet.inference

* Fix

* merge

* refactor utils

* Use deployer and deploy_model to manage pipeline

* Resolve comments

* Add a real inference api function

* rename wrappers

* Set execute to private method

* Rename deployer deploy_model

* Refactor task

* remove type hint

* lint

* Resolve comments

* resolve comments

* lint

* docstring

* Fix errors

* lint

* resolve comments

* fix bugs

* conflict

* lint and typo

* Resolve comment

* refactor mmseg (open-mmlab#201)

* support mmseg

* fix docstring

* fix docstring

* [Refactor]: Get the count of backend files (open-mmlab#202)

* Fix backend files

* resolve comments

* lint

* Fix ncnn

* [Refactor]: Refactor folders of mmdet (open-mmlab#200)

* Move folders

* lint

* test object detection model

* lint

* reset changes

* fix openvino

* resolve comments

* __init__.py

* Fix path

* [Refactor]: move mmseg (open-mmlab#206)

* [Refactor]: Refactor mmedit (open-mmlab#205)

* feature mmedit

* edit2.0

* edit

* refactor mmedit

* fix __init__.py

* fix __init__

* fix formai

* fix comment

* fix comment

* Fix wrong func_name of ConvFCBBoxHead (open-mmlab#209)

* [Refactor]: Refactor mmdet unit test (open-mmlab#207)

* Move folders

* lint

* test object detection model

* lint

* WIP

* remove print

* finish unit test

* Fix tests

* resolve comments

* Add mask test

* lint

* resolve comments

* Refine cfg file

* Move files

* add files

* Fix path

* [Unittest]: Refine the unit tests in mmdet open-mmlab#214

* [Refactor] refactor mmocr to mmdeploy/codebase (open-mmlab#213)

* refactor mmocr to mmdeploy/codebase

* fix docstring of show_result

* fix docstring of visualize

* refine docstring

* replace print with logging

* refince codes

* resolve comments

* resolve comments

* [Refactor]: mmseg  tests (open-mmlab#210)

* refactor mmseg tests

* rename test_codebase

* update

* add model.py

* fix

* [Refactor] Refactor mmcls and the package (open-mmlab#217)

* refactor mmcls

* fix yapf

* fix isort

* refactor-mmcls-package

* fix print to logging

* fix docstrings according to others comments

* fix comments

* fix comments

* fix allentdans comment in pr215

* remove mmocr init

* [Refactor] Refactor mmedit tests (open-mmlab#212)

* feature mmedit

* edit2.0

* edit

* refactor mmedit

* fix __init__.py

* fix __init__

* fix formai

* fix comment

* fix comment

* buff

* edit test and code refactor

* refactor dir

* refactor tests/mmedit

* fix docstring

* add test coverage

* fix lint

* fix comment

* fix comment

* Update typehint (open-mmlab#216)

* update type hint

* update docstring

* update

* remove file

* fix ppl

* Refine get_predefined_partition_cfg

* fix tensorrt version > 8

* move parse_cuda_device_id to device.py

* Fix cascade

* onnx2ncnn docstring

Co-authored-by: Yifan Zhou <singlezombie@163.com>
Co-authored-by: RunningLeon <maningsheng@sensetime.com>
Co-authored-by: VVsssssk <88368822+VVsssssk@users.noreply.github.com>
Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com>
Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants