From ded49e75c514953fa2327e554e2f3c2789347225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Mon, 18 Jan 2021 12:27:20 +0100 Subject: [PATCH] Fixes asv configuration (#205) * Fixes asv configuration * Fix failing unit tests * update benchmark script --- .../ut__skl2onnx/test_sklearn_pipeline.py | 3 ++- bin/run_asv.bat | 18 ++++++++++++++---- bin/run_asv.sh | 2 +- bin/run_asv2.bat | 2 +- mlprodict/asv_benchmark/_create_asv_helper.py | 2 +- mlprodict/asv_benchmark/asv.conf.json | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/_unittests/ut__skl2onnx/test_sklearn_pipeline.py b/_unittests/ut__skl2onnx/test_sklearn_pipeline.py index 85cd7a221..f75f5b777 100644 --- a/_unittests/ut__skl2onnx/test_sklearn_pipeline.py +++ b/_unittests/ut__skl2onnx/test_sklearn_pipeline.py @@ -134,6 +134,7 @@ def test_combine_inputs_floats_ints(self): model, "pipeline", [ + # First input decides the output type. ("input2", FloatTensorType([None, 1])), ("input1", Int64TensorType([None, 1])), ], @@ -421,5 +422,5 @@ def test_pipeline_dataframe(self): if __name__ == "__main__": - TestSklearnPipeline().test_combine_inputs_floats_ints() + # TestSklearnPipeline().test_combine_inputs_floats_ints() unittest.main() diff --git a/bin/run_asv.bat b/bin/run_asv.bat index 620ff4537..b4347d263 100644 --- a/bin/run_asv.bat +++ b/bin/run_asv.bat @@ -1,7 +1,17 @@ +@echo off +set current=%~dp0 +cd %~dp0.. +echo --MACHINE-- +python -m asv machine --yes --config mlprodict/asv_benchmark/asv.conf.json +echo . echo --BENCH-- -cd .. -echo --RUN-- -python -m asv run --show-stderr --config mlprodict/asv_benchmark/asv.conf.json +python -m asv run --show-stderr --config mlprodict/asv_benchmark/asv.conf.json --environment existing:same +echo --CLEAN-- if exist dist/html/asv rmdir dist/html/asv -r -f +rem if exist build/env rmdir build/env -r -f + echo --PUBLISH-- -python -m asv publish --config mlprodict/asv_benchmark/asv.conf.json -o ../../dist/asv/html || exit 1 \ No newline at end of file +python -m asv publish --config mlprodict/asv_benchmark/asv.conf.json -o ../../dist/asv/html + +echo --END-- +cd %current% diff --git a/bin/run_asv.sh b/bin/run_asv.sh index 05a86a93e..39e4d3127 100644 --- a/bin/run_asv.sh +++ b/bin/run_asv.sh @@ -13,4 +13,4 @@ then rm build/env -r -f fi echo --PUBLISH-- -python -m asv publish --config mlprodict/asv_benchmark/asv.conf.json -o ../../dist/asv/html || exit 1 \ No newline at end of file +python -m asv publish --config mlprodict/asv_benchmark/asv.conf.json -o ../../dist/asv/html --environment existing:same || exit 1 \ No newline at end of file diff --git a/bin/run_asv2.bat b/bin/run_asv2.bat index 96de80c81..a9e1f157f 100644 --- a/bin/run_asv2.bat +++ b/bin/run_asv2.bat @@ -12,4 +12,4 @@ python -m asv run --show-stderr --config=_benches\\asv.conf.json -v @echo --PUBLISH-- python -m asv publish -o build\html --config=_benches\\asv.conf.json @echo --END-- -cd %current% \ No newline at end of file +cd %current% diff --git a/mlprodict/asv_benchmark/_create_asv_helper.py b/mlprodict/asv_benchmark/_create_asv_helper.py index 595970572..8dfa404ea 100644 --- a/mlprodict/asv_benchmark/_create_asv_helper.py +++ b/mlprodict/asv_benchmark/_create_asv_helper.py @@ -35,7 +35,7 @@ "environment_type": "virtualenv", "install_timeout": 600, "show_commit_url": "https://github.com/sdpython/mlprodict/commit/", - "pythons": ["3.7"], + # "pythons": ["__PYVER__"], "matrix": { "cython": [], "jinja2": [], diff --git a/mlprodict/asv_benchmark/asv.conf.json b/mlprodict/asv_benchmark/asv.conf.json index 31254cd03..0f9b75003 100644 --- a/mlprodict/asv_benchmark/asv.conf.json +++ b/mlprodict/asv_benchmark/asv.conf.json @@ -55,7 +55,7 @@ // The Pythons you'd like to test against. If not provided, defaults // to the current version of Python used to run `asv`. - "pythons": ["3.7"], + // "pythons": ["3.8"], // The list of conda channel names to be searched for benchmark // dependency packages in the specified order