Uses the given `dataset_name` argument (instead of the names in cfg), because the standard practice is to evaluate each test set individually (not combining them).
(cfg, dataset_name, mapper=None)
| 385 | |
| 386 | |
| 387 | def _test_loader_from_config(cfg, dataset_name, mapper=None): |
| 388 | """ |
| 389 | Uses the given `dataset_name` argument (instead of the names in cfg), because the |
| 390 | standard practice is to evaluate each test set individually (not combining them). |
| 391 | """ |
| 392 | dataset = get_detection_dataset_dicts( |
| 393 | [dataset_name], |
| 394 | filter_empty=False, |
| 395 | proposal_files=[ |
| 396 | cfg.DATASETS.PROPOSAL_FILES_TEST[list(cfg.DATASETS.TEST).index(dataset_name)] |
| 397 | ] |
| 398 | if cfg.MODEL.LOAD_PROPOSALS |
| 399 | else None, |
| 400 | ) |
| 401 | if mapper is None: |
| 402 | mapper = DatasetMapper(cfg, False) |
| 403 | return {"dataset": dataset, "mapper": mapper, "num_workers": cfg.DATALOADER.NUM_WORKERS} |
| 404 | |
| 405 | |
| 406 | @configurable(from_config=_test_loader_from_config) |
nothing calls this directly
no test coverage detected