-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Description
🚀 Feature
We are currently doing hacks like the following to parameterize the tests:
Lines 149 to 157 in 43d7720
kwargs = {} | |
if "retinanet" in name: | |
# Reduce the default threshold to ensure the returned boxes are not empty. | |
kwargs["score_thresh"] = 0.01 | |
elif "fasterrcnn_mobilenet_v3_large" in name: | |
kwargs["box_score_thresh"] = 0.02076 | |
if "fasterrcnn_mobilenet_v3_large_320_fpn" in name: | |
kwargs["rpn_pre_nms_top_n_test"] = 1000 | |
kwargs["rpn_post_nms_top_n_test"] = 1000 |
Instead we should use parameterize to pass (model, params) combinations:
Lines 449 to 452 in 43d7720
@pytest.mark.parametrize('model_name', get_available_detection_models()) | |
@pytest.mark.parametrize('dev', _devs) | |
def test_detection_model(model_name, dev): | |
ModelTester()._test_detection_model(model_name, dev) |