From ca712a6830fd780f3da31f8e73faf068be80dc99 Mon Sep 17 00:00:00 2001 From: Krithika Sundararajan Date: Thu, 2 Nov 2023 08:17:51 +0800 Subject: [PATCH] Remove support for Python 3.7 (#365) --- .github/workflows/pyfunc-ensembler-job.yaml | 6 ++---- .github/workflows/pyfunc-ensembler-service.yaml | 6 ++---- engines/pyfunc-ensembler-job/Dockerfile | 4 +--- engines/pyfunc-ensembler-job/env-3.7.yaml | 8 -------- engines/pyfunc-ensembler-job/requirements.txt | 3 +-- engines/pyfunc-ensembler-job/setup.py | 2 +- engines/pyfunc-ensembler-service/env-3.7.yaml | 8 -------- engines/pyfunc-ensembler-service/requirements.txt | 3 +-- engines/pyfunc-ensembler-service/setup.py | 2 +- sdk/samples/quickstart/quick_start.py | 2 +- sdk/tests/ensembler_test.py | 2 +- 11 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 engines/pyfunc-ensembler-job/env-3.7.yaml delete mode 100644 engines/pyfunc-ensembler-service/env-3.7.yaml diff --git a/.github/workflows/pyfunc-ensembler-job.yaml b/.github/workflows/pyfunc-ensembler-job.yaml index 39b459af4..b51e91a74 100644 --- a/.github/workflows/pyfunc-ensembler-job.yaml +++ b/.github/workflows/pyfunc-ensembler-job.yaml @@ -30,8 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # TODO: Remove support for Python 3.7 - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 @@ -93,8 +92,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # TODO: Remove support for Python 3.7 - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] needs: - release-rules - test diff --git a/.github/workflows/pyfunc-ensembler-service.yaml b/.github/workflows/pyfunc-ensembler-service.yaml index 67a5fbc01..25a55b22f 100644 --- a/.github/workflows/pyfunc-ensembler-service.yaml +++ b/.github/workflows/pyfunc-ensembler-service.yaml @@ -30,8 +30,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # TODO: Remove support for Python 3.7 - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v3 @@ -87,8 +86,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # TODO: Remove support for Python 3.7 - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] needs: - release-rules - test diff --git a/engines/pyfunc-ensembler-job/Dockerfile b/engines/pyfunc-ensembler-job/Dockerfile index 283196ed6..f3c1af0f0 100644 --- a/engines/pyfunc-ensembler-job/Dockerfile +++ b/engines/pyfunc-ensembler-job/Dockerfile @@ -1,6 +1,4 @@ -ARG SPARK_VERSION=v3.0.0 - -FROM gcr.io/spark-operator/spark-py:$SPARK_VERSION +FROM apache/spark-py:v3.1.3 ENV SPARK_OPERATOR_VERSION=v1beta2-1.3.7-3.1.1 ENV SPARK_BQ_CONNECTOR_VERSION=0.27.0 diff --git a/engines/pyfunc-ensembler-job/env-3.7.yaml b/engines/pyfunc-ensembler-job/env-3.7.yaml deleted file mode 100644 index d5e347ac3..000000000 --- a/engines/pyfunc-ensembler-job/env-3.7.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: pyfunc-ensembler-job -dependencies: - - python=3.7.* - - pip=22.2.2 - - pip: - - -r requirements.txt - - --extra-index-url=https://test.pypi.org/simple - - --trusted-host=test.pypi.org diff --git a/engines/pyfunc-ensembler-job/requirements.txt b/engines/pyfunc-ensembler-job/requirements.txt index d7cf25da7..f66f6d30e 100644 --- a/engines/pyfunc-ensembler-job/requirements.txt +++ b/engines/pyfunc-ensembler-job/requirements.txt @@ -9,5 +9,4 @@ py4j==0.10.9 pyarrow>=0.14.1,<=9.0.0 pyspark==3.0.1 pyyaml==6.0 -#TODO: Update turing-sdk dep to: file:../../sdk -turing-sdk==0.11.0 # Pin to the version that supports Python 3.7. +file:../../sdk diff --git a/engines/pyfunc-ensembler-job/setup.py b/engines/pyfunc-ensembler-job/setup.py index 45d4493b1..2ee7aca07 100644 --- a/engines/pyfunc-ensembler-job/setup.py +++ b/engines/pyfunc-ensembler-job/setup.py @@ -20,5 +20,5 @@ packages=setuptools.find_packages(), install_requires=requirements, dev_requirements=dev_requirements, - python_requires=">=3.7,<3.11", + python_requires=">=3.8,<3.11", ) diff --git a/engines/pyfunc-ensembler-service/env-3.7.yaml b/engines/pyfunc-ensembler-service/env-3.7.yaml deleted file mode 100644 index 90004d7ca..000000000 --- a/engines/pyfunc-ensembler-service/env-3.7.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: pyfunc-ensembler-service -dependencies: - - python=3.7.* - - pip=21.2.2 - - pip: - - -r requirements.txt - - --extra-index-url=https://test.pypi.org/simple - - --trusted-host=test.pypi.org \ No newline at end of file diff --git a/engines/pyfunc-ensembler-service/requirements.txt b/engines/pyfunc-ensembler-service/requirements.txt index f17160c0b..191353c26 100644 --- a/engines/pyfunc-ensembler-service/requirements.txt +++ b/engines/pyfunc-ensembler-service/requirements.txt @@ -2,5 +2,4 @@ argparse>=1.4.0 cloudpickle==2.0.0 orjson==3.6.8 tornado==6.1 -#TODO: Update turing-sdk dep to: file:../../sdk -turing-sdk==0.11.0 # Pin to the version that supports Python 3.7. +file:../../sdk diff --git a/engines/pyfunc-ensembler-service/setup.py b/engines/pyfunc-ensembler-service/setup.py index be235c23a..101c117a7 100644 --- a/engines/pyfunc-ensembler-service/setup.py +++ b/engines/pyfunc-ensembler-service/setup.py @@ -20,5 +20,5 @@ packages=setuptools.find_packages(), install_requires=requirements, dev_requirements=dev_requirements, - python_requires=">=3.7,<3.11", + python_requires=">=3.8,<3.11", ) diff --git a/sdk/samples/quickstart/quick_start.py b/sdk/samples/quickstart/quick_start.py index 8e31f97f2..5b4a65f1f 100644 --- a/sdk/samples/quickstart/quick_start.py +++ b/sdk/samples/quickstart/quick_start.py @@ -37,7 +37,7 @@ def main(turing_api: str, project: str): ensembler_instance=MyEnsembler(), conda_env={ "channels": ["defaults"], - "dependencies": ["python=3.7.0", "cookiecutter>=1.7.2", "numpy"], + "dependencies": ["python=3.9.0", "cookiecutter>=1.7.2", "numpy"], }, code_dir=[os.path.join(os.path.dirname(__file__), "../../samples")], ) diff --git a/sdk/tests/ensembler_test.py b/sdk/tests/ensembler_test.py index de84ab159..78843ddd6 100644 --- a/sdk/tests/ensembler_test.py +++ b/sdk/tests/ensembler_test.py @@ -106,7 +106,7 @@ def test_create_ensembler( ensembler_instance=tests.MyTestEnsembler(0.01), conda_env={ "channels": ["defaults"], - "dependencies": ["python=3.7.0", {"pip": ["test-lib==0.0.1"]}], + "dependencies": ["python=3.9.0", {"pip": ["test-lib==0.0.1"]}], }, )