triton-inference-server / fil_backend

FIL backend for the Triton Inference Server
Apache License 2.0
67 stars 35 forks source link

Rewrite tests #346

Open RAMitchell opened 1 year ago

RAMitchell commented 1 year ago

This PR moves the model generation and loading into pytest.

This achieves a few things:

The tests run faster than before, are easy to extend and we can generate more coverage.

Todo:

RAMitchell commented 1 year ago

I have updated this so that models are generated using the original code but cached automatically using joblib.memory. Here below is an example of the test matrix (68 items), taking 130s. I think it will be particularly useful to test the experimental_optimization flag for all as the backend is updated with the latest cuml changes.

../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:True-num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_xgb[use_json:False-num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_lgbm_classification_model[num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn[num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_cuml[num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:2-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:2-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:2-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:2-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:10-instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:10-instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:10-instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestClassifiers::test_sklearn_gbm[num_class:10-instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_xgb[instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_xgb[instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_xgb[instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_xgb[instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_lgbm[instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_lgbm[instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_lgbm[instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_lgbm[instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn[instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn[instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn[instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn[instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_cuml[instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_cuml[instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_cuml[instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_cuml[instance:KIND_GPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn_gbm[instance:KIND_CPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn_gbm[instance:KIND_CPU-exper_optim:False] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn_gbm[instance:KIND_GPU-exper_optim:True] PASSED
../../qa/L0_e2e/test_model.py::TestRegressors::test_sklearn_gbm[instance:KIND_GPU-exper_optim:False] PASSED