Add engine for unified entrypoints in downstream projects#695
Closed
ZwwWayne wants to merge 9 commits intoopen-mmlab:masterfrom
Closed
Add engine for unified entrypoints in downstream projects#695ZwwWayne wants to merge 9 commits intoopen-mmlab:masterfrom
ZwwWayne wants to merge 9 commits intoopen-mmlab:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #695 +/- ##
==========================================
- Coverage 64.85% 64.53% -0.33%
==========================================
Files 136 139 +3
Lines 7989 8165 +176
Branches 1411 1440 +29
==========================================
+ Hits 5181 5269 +88
- Misses 2539 2618 +79
- Partials 269 278 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Collaborator
|
|
hellock
reviewed
Feb 7, 2021
| time.sleep(2) # This line can prevent deadlock problem in some cases. | ||
| for i, data in enumerate(data_loader): | ||
| with torch.no_grad(): | ||
| result = model(return_loss=False, rescale=True, **data) |
Member
There was a problem hiding this comment.
This may not be applicable to all downstream codebases.
| results.extend(result) | ||
|
|
||
| if rank == 0: | ||
| batch_size = len(result) |
| return results | ||
|
|
||
|
|
||
| def collect_results_cpu(result_part, size, tmpdir=None): |
| return ordered_results | ||
|
|
||
|
|
||
| def collect_results_gpu(result_part, size): |
hellock
reviewed
Feb 7, 2021
|
|
||
|
|
||
| def parse_int_float_bool(val): | ||
| """Parse string value to be integer, float, or boolean value. |
Member
There was a problem hiding this comment.
Add detailed description on:
- the priority
- some examples
hellock
reviewed
Feb 7, 2021
|
|
||
| def setup_cfg(args, cfg_args): | ||
| """Set up config. | ||
|
|
Collaborator
Author
|
As there is a new plan. The proposal of a unified entrypoint has been deprecated and this PR is closed. |
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.
This PR adds a directory named engine in MMCV, which implements and unifies common functions for starting a training/testing process in downstream codebases. With
mmcv.engine, downstream codebases like MMAction or MMClassification could directly use these functions and share a similar entry point script for training or testing a model.This PR does not affect its dependencies' functionality, but its dependencies could update and unify their training/testing scripts after this PR is merged.