-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Enhance] Add cfg-options
in argument
#212
Conversation
cfg-options
cfg-options
Codecov Report
@@ Coverage Diff @@
## master #212 +/- ##
==========================================
- Coverage 85.08% 85.03% -0.06%
==========================================
Files 81 81
Lines 5276 5258 -18
Branches 849 849
==========================================
- Hits 4489 4471 -18
Misses 648 648
Partials 139 139
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
31abcd7
to
f3cf089
Compare
tools/test.py
Outdated
nargs='+', | ||
action=DictAction, | ||
help='override some settings in the used config, the key-value pair ' | ||
'in xxx=yyy format will be merged into config file.') |
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.
use an example of overwriting two options would be great
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.
Example is added
tools/test.py
Outdated
cfg = Config.fromfile(args.config) | ||
|
||
if args.cfg_options is not None: | ||
cfg.merge_from_dict(args.cfg_options) |
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.
if --cfg-options
defaults to an empty dict, can the above two lines be reduced into one line?
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.
set default={}
now
d2ad88f
to
4c2dbe2
Compare
cfg-options
cfg-options
in argument
No description provided.