-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add runner builder #570
Add runner builder #570
Conversation
Codecov Report
@@ Coverage Diff @@
## master #570 +/- ##
==========================================
+ Coverage 64.69% 64.91% +0.21%
==========================================
Files 133 134 +1
Lines 7600 7616 +16
Branches 1338 1342 +4
==========================================
+ Hits 4917 4944 +27
+ Misses 2435 2422 -13
- Partials 248 250 +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.
The PR looks good to me.
* Add build_runner * Parametrize test_runner * Add imports to runner __init__ * Refactor max_iters and max_epochs from run to init * Add assertion error messages * Add test_builder * Make change retro-compatible * Raise ValueError if max_epochs and max_iters
* tag 'v1.1.5': (81 commits) bump version to 1.1.5 (open-mmlab#603) Fix wrappers version comparison (open-mmlab#602) revert dcn (open-mmlab#597) lint markdown files (open-mmlab#592) bump version to 1.1.4 (open-mmlab#591) fix lint open-mmlab#580 (open-mmlab#590) Fixed fp16_optimizer state bug (open-mmlab#580) register deconv in CONV_LAYERS (open-mmlab#582) [enhance]: show grad norm in fp16 optimizer hook (open-mmlab#584) [Enhance] Switch to https://download.openmmlab.com (open-mmlab#583) Support to specify LR of DCN's conv_offset (open-mmlab#344) add torchvision roi_align with aligned=True (open-mmlab#581) Add runner builder (open-mmlab#570) [fix]: fix wrapper comparison of pytorch version (open-mmlab#572) Add missing by_epoch arg (open-mmlab#576) merge the calling of train/val_step and batch_processor into run_iter (open-mmlab#553) bump version to 1.1.3 (open-mmlab#569) fix deprecated wrappers exiting bug (open-mmlab#567) add switch for onnx exporter (open-mmlab#564) fix dcon forward and backward bug (open-mmlab#565) ...
This P.R. adds a new method
build_runner
and a new Registry object:RUNNERS
for managing runner types.This allows to specify runner type (and corresponding parameters) via configuration files.
The
max_iters
andmax_epochs
arguments have been moved fromrun
to__init__
(this change is backwards compatible with deprecation warning).I don't know if there was a use case that needed to have them in
run
but in all downstream repos (mmdet, mmseg, etc) those args were parsed from config so i think it makes sense to set them during instantiation.Discussed in open-mmlab/mmsegmentation#118