-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Tools] Support replacing the ${key} with the value of cfg.key #7492
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #7492 +/- ##
==========================================
+ Coverage 64.89% 64.90% +0.01%
==========================================
Files 351 352 +1
Lines 28466 28497 +31
Branches 4807 4819 +12
==========================================
+ Hits 18472 18495 +23
- Misses 9014 9024 +10
+ Partials 980 978 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Support replacing config * Support replacing config * Add unit test for replace_cfig * pre-commit * fix * modify the docstring * rename function * fix a bug * fix a bug and simplify the code * simplify the code * add replace_cfg_vals for some scripts * add replace_cfg_vals for some scripts * add some unit tests
…mmlab#7492) * Support replacing config * Support replacing config * Add unit test for replace_cfig * pre-commit * fix * modify the docstring * rename function * fix a bug * fix a bug and simplify the code * simplify the code * add replace_cfg_vals for some scripts * add replace_cfg_vals for some scripts * add some unit tests
…mmlab#7492) * Support replacing config * Support replacing config * Add unit test for replace_cfig * pre-commit * fix * modify the docstring * rename function * fix a bug * fix a bug and simplify the code * simplify the code * add replace_cfg_vals for some scripts * add replace_cfg_vals for some scripts * add some unit tests
…mmlab#7492) * Support replacing config * Support replacing config * Add unit test for replace_cfig * pre-commit * fix * modify the docstring * rename function * fix a bug * fix a bug and simplify the code * simplify the code * add replace_cfg_vals for some scripts * add replace_cfg_vals for some scripts * add some unit tests
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
Replace the ${key} with the value of ori_cfg.key in the config. And support replacing the chained ${key}. Such as, replace ${key0.key1} with the value of cfg.key0.key1.
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repos?
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)
The origin config with "${key}":
After replacing the ${key} with the corresponding value.
The
updated_cfg
satisfies thatChecklist