From cee36988db114c8f46bd4f5e142b75c00e7974c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Fri, 7 Jan 2022 14:04:58 +0100 Subject: [PATCH 01/12] update for python 3.10 --- .circleci/config.yml | 2 +- .travis.yml | 5 +++++ LICENSE.txt | 2 +- _doc/sphinxdoc/source/conf.py | 2 +- appveyor.yml | 4 ++++ azure-pipelines.yml | 20 ++++++++++---------- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4a83aaf..04a2eaf0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/python:3.9.6 + - image: circleci/python:3.10.1 working_directory: ~/repo diff --git a/.travis.yml b/.travis.yml index 989256bc..059112ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,11 @@ language: python matrix: include: + - python: 3.10 + name: "Py310-024+" + env: + - sklver=">=0.24.2" + - jlver=">=1.0" - python: 3.9 name: "Py39-024+" env: diff --git a/LICENSE.txt b/LICENSE.txt index 47eced03..97ea4c01 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017-2021, Xavier Dupré +Copyright (c) 2017-2022, Xavier Dupré Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/_doc/sphinxdoc/source/conf.py b/_doc/sphinxdoc/source/conf.py index d918a5c8..edf2496b 100644 --- a/_doc/sphinxdoc/source/conf.py +++ b/_doc/sphinxdoc/source/conf.py @@ -13,7 +13,7 @@ local_template = os.path.join(os.path.abspath( os.path.dirname(__file__)), "phdoc_templates") -set_sphinx_variables(__file__, "mlinsights", "Xavier Dupré", 2021, +set_sphinx_variables(__file__, "mlinsights", "Xavier Dupré", 2022, "pydata_sphinx_theme", pydata_sphinx_theme.get_html_theme_path(), locals(), extlinks=dict( issue=('https://github.com/sdpython/mlinsights/issues/%s', 'issue')), diff --git a/appveyor.yml b/appveyor.yml index ca2d49ac..475ce607 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,10 @@ image: - Visual Studio 2019 environment: matrix: + - PYTHON: "C:\\Python310-x64" + PYTHON_VERSION: "3.10.x" + PYTHON_ARCH: "64" + SKL: '>=1.0' - PYTHON: "C:\\Python39-x64" PYTHON_VERSION: "3.9.x" PYTHON_ARCH: "64" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5dd96a19..5deefb50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,8 @@ jobs: vmImage: 'ubuntu-latest' strategy: matrix: - Python39-Linux: - python.version: '3.9' + Python310-Linux: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -51,8 +51,8 @@ jobs: python -m pip install cibuildwheel export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_24" export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming" - export CIBW_BUILD="cp39-manylinux_x86_64" - python -m cibuildwheel --output-dir dist/wheelhouse39 --platform linux + export CIBW_BUILD="cp39-manylinux_x86_64 cp310-manylinux_x86_64" + python -m cibuildwheel --output-dir dist/wheelhouse_2 --platform linux displayName: 'Build Package manylinux_x_y' - script: | python -m pip install cibuildwheel @@ -71,8 +71,8 @@ jobs: vmImage: 'windows-latest' strategy: matrix: - Python39-Windows: - python.version: '3.9' + Python310-Windows: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -92,7 +92,7 @@ jobs: - script: | python -m pip install cibuildwheel set CIBW_BEFORE_BUILD=pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming - set CIBW_BUILD=cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 + set CIBW_BUILD=cp37-win_amd64 cp38-win_amd64 cp39-win_amd64 cp310-win_amd64 python -m cibuildwheel --output-dir dist/wheelhouse displayName: 'Build Package many' - task: PublishPipelineArtifact@0 @@ -105,8 +105,8 @@ jobs: vmImage: 'macOS-latest' strategy: matrix: - Python39-MacOs: - python.version: '3.9' + Python310-MacOs: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -159,7 +159,7 @@ jobs: - script: | python -m pip install cibuildwheel export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming" - export CIBW_BUILD="cp37-macosx_x86_64 cp38-macosx_x86_64 cp39-macosx_x86_64" + export CIBW_BUILD="cp37-macosx_x86_64 cp38-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64" python -m cibuildwheel --output-dir dist/wheelhouse displayName: 'Build Package many' - task: PublishPipelineArtifact@0 From 5cb6fc169780e6f26c15c4c94f64a8d45fdd61e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Fri, 7 Jan 2022 14:19:42 +0100 Subject: [PATCH 02/12] update CI --- appveyor.yml | 2 +- azure-pipelines.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 475ce607..51d93fbe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ install: - "%PYTHON%\\Scripts\\pip install -r requirements-win.txt" # install precompiled versions not available on pypi - "%PYTHON%\\Scripts\\pymy_install3 llvmlite numba" - - "%PYTHON%\\Scripts\\pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html" + - "%PYTHON%\\Scripts\\pip install torch torchvision torchaudio" # other dependencies - "%PYTHON%\\Scripts\\pip install -r requirements.txt --no-deps" - "%PYTHON%\\Scripts\\pip install scikit-learn%SKL%" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5deefb50..d7f26852 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,8 @@ jobs: vmImage: 'ubuntu-latest' strategy: matrix: - Python310-Linux: - python.version: '3.10' + Python39-Linux: + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -37,7 +37,7 @@ jobs: displayName: 'Install tools' - script: pip install numpy displayName: 'Install numpy' - - script: pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html + - script: pip install torch torchvision torchaudio displayName: 'Install pytorch' - script: | export LLVM_CONFIG=/usr/bin/llvm-config-10 @@ -71,8 +71,8 @@ jobs: vmImage: 'windows-latest' strategy: matrix: - Python310-Windows: - python.version: '3.10' + Python39-Windows: + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -105,8 +105,8 @@ jobs: vmImage: 'macOS-latest' strategy: matrix: - Python310-MacOs: - python.version: '3.10' + Python39-MacOs: + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 From b3f30be50944dad18efe063a64f5028a42e854de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Sat, 8 Jan 2022 12:38:07 +0100 Subject: [PATCH 03/12] update CI --- .travis.yml | 5 ----- appveyor.yml | 8 ++------ azure-pipelines.yml | 12 ++++++------ requirements.txt | 2 ++ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 059112ca..e4f2ecc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,11 +14,6 @@ matrix: env: - sklver=">=0.24.2" - jlver=">=1.0" - - python: 3.8 - name: "Py38-023" - env: - - sklver="==0.23.2" - - jlver="==0.17.0" before_install: - sudo apt-get install libgeos-dev libproj-dev proj-data graphviz libblas-dev liblapack-dev diff --git a/appveyor.yml b/appveyor.yml index 51d93fbe..d4fca8c5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,23 +10,19 @@ environment: PYTHON_VERSION: "3.9.x" PYTHON_ARCH: "64" SKL: '>=1.0' - - PYTHON: "C:\\Python39-x64" - PYTHON_VERSION: "3.9.x" - PYTHON_ARCH: "64" - SKL: '==0.24.2' - PYTHON: "C:\\Python38-x64" PYTHON_VERSION: "3.8.x" PYTHON_ARCH: "64" - SKL: '==0.23.2' + SKL: '==0.24.2' init: - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" install: - "%PYTHON%\\python -m pip install --upgrade pip" # for many packages + - pip install llvmlite==0.38.0rc1 numba==0.55.0rc1 - "%PYTHON%\\Scripts\\pip install -r requirements-win.txt" # install precompiled versions not available on pypi - - "%PYTHON%\\Scripts\\pymy_install3 llvmlite numba" - "%PYTHON%\\Scripts\\pip install torch torchvision torchaudio" # other dependencies - "%PYTHON%\\Scripts\\pip install -r requirements.txt --no-deps" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d7f26852..aa0e3630 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,8 @@ jobs: vmImage: 'ubuntu-latest' strategy: matrix: - Python39-Linux: - python.version: '3.9' + Python310-Linux: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -71,8 +71,8 @@ jobs: vmImage: 'windows-latest' strategy: matrix: - Python39-Windows: - python.version: '3.9' + Python310-Windows: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -105,8 +105,8 @@ jobs: vmImage: 'macOS-latest' strategy: matrix: - Python39-MacOs: - python.version: '3.9' + Python310-MacOs: + python.version: '3.10' maxParallel: 3 steps: - task: UsePythonVersion@0 diff --git a/requirements.txt b/requirements.txt index 4f9ac683..10cf3060 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,9 +6,11 @@ cython joblib jupyter_sphinx>=0.2 jyquickhelper +llvmlite==0.38.0rc1 matplotlib memory_profiler>=0.55 nbconvert>=6.0.2 +numba==0.55.0rc1 numpy onnx onnxruntime From f71189670671a7eef03452f6712d7d4e224dac2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Sat, 8 Jan 2022 13:03:06 +0100 Subject: [PATCH 04/12] update CI --- .circleci/config.yml | 2 +- .travis.yml | 5 ----- appveyor.yml | 4 ---- azure-pipelines.yml | 12 ++++++------ 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04a2eaf0..a6db8fe2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/python:3.10.1 + - image: circleci/python:3.9.9 working_directory: ~/repo diff --git a/.travis.yml b/.travis.yml index e4f2ecc4..ccb7602b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,6 @@ language: python matrix: include: - - python: 3.10 - name: "Py310-024+" - env: - - sklver=">=0.24.2" - - jlver=">=1.0" - python: 3.9 name: "Py39-024+" env: diff --git a/appveyor.yml b/appveyor.yml index d4fca8c5..a6313372 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,10 +2,6 @@ image: - Visual Studio 2019 environment: matrix: - - PYTHON: "C:\\Python310-x64" - PYTHON_VERSION: "3.10.x" - PYTHON_ARCH: "64" - SKL: '>=1.0' - PYTHON: "C:\\Python39-x64" PYTHON_VERSION: "3.9.x" PYTHON_ARCH: "64" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aa0e3630..a98cc461 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,8 @@ jobs: vmImage: 'ubuntu-latest' strategy: matrix: - Python310-Linux: - python.version: '3.10' + Python39-Linux: + python.version: '39' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -71,8 +71,8 @@ jobs: vmImage: 'windows-latest' strategy: matrix: - Python310-Windows: - python.version: '3.10' + Python39-Windows: + python.version: '39' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -105,8 +105,8 @@ jobs: vmImage: 'macOS-latest' strategy: matrix: - Python310-MacOs: - python.version: '3.10' + Python39-MacOs: + python.version: '39' maxParallel: 3 steps: - task: UsePythonVersion@0 From 4bc32b938c3306d9749038cb8dbb228ea3abd36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Sat, 8 Jan 2022 13:06:14 +0100 Subject: [PATCH 05/12] Update azure-pipelines.yml --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a98cc461..d7f26852 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: Python39-Linux: - python.version: '39' + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -72,7 +72,7 @@ jobs: strategy: matrix: Python39-Windows: - python.version: '39' + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 @@ -106,7 +106,7 @@ jobs: strategy: matrix: Python39-MacOs: - python.version: '39' + python.version: '3.9' maxParallel: 3 steps: - task: UsePythonVersion@0 From 745b1243233b2c03db348417642dcab2ce2c9828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Sat, 8 Jan 2022 13:19:11 +0100 Subject: [PATCH 06/12] Update search_engine_vectors.py --- mlinsights/search_rank/search_engine_vectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlinsights/search_rank/search_engine_vectors.py b/mlinsights/search_rank/search_engine_vectors.py index f3ebba3d..eeec1207 100644 --- a/mlinsights/search_rank/search_engine_vectors.py +++ b/mlinsights/search_rank/search_engine_vectors.py @@ -228,7 +228,7 @@ def to_zip(self, zipfilename, **kwargs): else: zf = zipfilename close = False - if 'index' is not kwargs: + if 'index' not in kwargs: kwargs['index'] = False to_zip(self.features_, zf, 'SearchEngineVectors-features.npy') to_zip(self.metadata_, zf, 'SearchEngineVectors-metadata.csv', **kwargs) From 39a5b72d26d85694809df26a87ee9b407d2368e1 Mon Sep 17 00:00:00 2001 From: xadupre Date: Fri, 22 Jul 2022 18:28:09 +0200 Subject: [PATCH 07/12] update CI --- .circleci/config.yml | 29 +++++++++-------------------- .travis.yml | 6 +++--- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 28ad3ea6..047dd87c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/python:3.9.9 + - image: cimg/python:3.10.5 working_directory: ~/repo @@ -51,26 +51,20 @@ jobs: - run: name: Install standard libraries command: | - python -m venv venv - . venv/bin/activate - pip install scipy matplotlib numpy cython pandas + python -m pip install scipy matplotlib numpy cython pandas - run: name: Install pyproj, shapely, cartopy command: | - python -m venv venv - . venv/bin/activate - pip install pyproj - pip uninstall -y shapely - pip install --no-binary shapely shapely - pip install cartopy + python -m pip install pyproj + python -m pip uninstall -y shapely + python -m pip install --no-binary shapely shapely + python -m pip install cartopy - run: name: install dependencies command: | - python -m venv venv - . venv/bin/activate - pip install -r requirements.txt + python -m pip install -r requirements.txt - save_cache: paths: @@ -80,27 +74,22 @@ jobs: - run: name: check list of dependencies command: | - python -m venv venv - . venv/bin/activate - pip freeze + python -m pip freeze apt list --installed - run: name: compile and build command: | - . venv/bin/activate python setup.py build_ext --inplace - run: name: run tests command: | - . venv/bin/activate python setup.py unittests -d 9 - run: name: wheel command: | - . venv/bin/activate python setup.py bdist_wheel mkdir -p test-reports/dist cp dist/*.whl test-reports/dist @@ -121,4 +110,4 @@ jobs: - store_artifacts: path: test-reports - destination: test-reports \ No newline at end of file + destination: test-reports diff --git a/.travis.yml b/.travis.yml index ccb7602b..07246680 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,10 @@ language: python matrix: include: - - python: 3.9 - name: "Py39-024+" + - python: 3.10 + name: "Py310" env: - - sklver=">=0.24.2" + - sklver=">=1.1" - jlver=">=1.0" before_install: From 814853aff27541feb3b86da47113a0a77c02f0ee Mon Sep 17 00:00:00 2001 From: xadupre Date: Fri, 22 Jul 2022 18:37:21 +0200 Subject: [PATCH 08/12] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index a69f37d5..9580f4b0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,11 +6,11 @@ cython joblib jupyter_sphinx>=0.2 jyquickhelper -llvmlite==0.38.0rc1 +llvmlite matplotlib memory_profiler>=0.55 nbconvert>=6.0.2 -numba==0.55.0rc1 +numba numpy onnx onnxruntime From 4655396145ce6d515b6d7efc12dffb490e435989 Mon Sep 17 00:00:00 2001 From: xadupre Date: Fri, 22 Jul 2022 18:40:24 +0200 Subject: [PATCH 09/12] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 047dd87c..fc381c4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: name: Install libproj command: | - sudo apt-get install -y libgeos-dev libproj-dev proj-data graphviz + sudo apt-get install -y libgeos-dev proj-bin proj-data graphviz - run: name: Install standard libraries From 8994ffe6129758b50d77752d574ed5bdd9e7141a Mon Sep 17 00:00:00 2001 From: xadupre Date: Fri, 22 Jul 2022 18:47:38 +0200 Subject: [PATCH 10/12] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fc381c4e..47d1bcfb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,7 +59,7 @@ jobs: python -m pip install pyproj python -m pip uninstall -y shapely python -m pip install --no-binary shapely shapely - python -m pip install cartopy + python -m pip install cartopy==0.18.0 - run: name: install dependencies From a2386410dd46bc9d64a612826f38849a586165ea Mon Sep 17 00:00:00 2001 From: xadupre Date: Fri, 22 Jul 2022 19:03:55 +0200 Subject: [PATCH 11/12] Update config.yml --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47d1bcfb..201f0ee1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: - run: name: Install libproj command: | - sudo apt-get install -y libgeos-dev proj-bin proj-data graphviz + sudo apt-get install -y libgeos-dev libproj-dev proj-data graphviz - run: name: Install standard libraries @@ -59,7 +59,11 @@ jobs: python -m pip install pyproj python -m pip uninstall -y shapely python -m pip install --no-binary shapely shapely - python -m pip install cartopy==0.18.0 + + - run: + name: Install cartopy + command: | + python -m pip install cartopy==0.19.0 - run: name: install dependencies From 5b94de71783e01fdae79090be1bed528fc6a2906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Fri, 22 Jul 2022 23:04:13 +0200 Subject: [PATCH 12/12] Update config.yml --- .circleci/config.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 201f0ee1..c97c4bfc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,28 +43,11 @@ jobs: command: | sudo apt-get install -y graphviz - - run: - name: Install libproj - command: | - sudo apt-get install -y libgeos-dev libproj-dev proj-data graphviz - - run: name: Install standard libraries command: | python -m pip install scipy matplotlib numpy cython pandas - - run: - name: Install pyproj, shapely, cartopy - command: | - python -m pip install pyproj - python -m pip uninstall -y shapely - python -m pip install --no-binary shapely shapely - - - run: - name: Install cartopy - command: | - python -m pip install cartopy==0.19.0 - - run: name: install dependencies command: |