[Feature] Support set dataloader args in config and and add function to handle config compatibility#7668
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #7668 +/- ##
==========================================
+ Coverage 64.76% 64.93% +0.17%
==========================================
Files 346 348 +2
Lines 28162 28323 +161
Branches 4755 4778 +23
==========================================
+ Hits 18238 18391 +153
+ Misses 8962 8956 -6
- Partials 962 976 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
It make an error raised when it wou better to add an if to tell if the |
…to handle config compatibility (#7668) * add cfg_compatibility and support loader args * resolve comments * add unitest * resolve comments * delete all warning
…to handle config compatibility (open-mmlab#7668) * add cfg_compatibility and support loader args * resolve comments * add unitest * resolve comments * delete all warning
…to handle config compatibility (open-mmlab#7668) * add cfg_compatibility and support loader args * resolve comments * add unitest * resolve comments * delete all warning
Describe the feature
cfg_compatibilityto handle the compatibility of configMotivation
Originally, the data field of config only allows the following usage:
Such a design only allows setting the different batch sizes in Val and test data loader.
Adding train_dataloader, val_dataloader, and test_dataloader in the data field of config allows more flexible usages.
A new example looks like below:
To achieve that, we should:
allow train_dataloader/val_dataloader/test_dataloader to be set in the data filed by modifying train_detector.
deprecate samples_per_gpu in data.val field by raising warnings if it is set
Related resources
See PR open-mmlab/mmpretrain#752.
Midification
build_dataloadercfg_compatibilityto handle the compatibilityBC
None