Skip to content

Commit

Permalink
Remove Python 3.7 support in turing-sdk (#362)
Browse files Browse the repository at this point in the history
* Remove Python3.7 support in turing-sdk

* Update turing-sdk dependency on the ensembler service and job images
  • Loading branch information
krithika369 authored Sep 14, 2023
1 parent 909c7eb commit 7fa5d36
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pyfunc-ensembler-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +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"]

steps:
Expand Down Expand Up @@ -92,6 +93,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"]
needs:
- release-rules
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pyfunc-ensembler-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +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"]

steps:
Expand Down Expand Up @@ -86,6 +87,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"]
needs:
- release-rules
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10"]

defaults:
run:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8

- name: Cache pip dependencies
uses: actions/cache@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/turing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ jobs:
with:
version: ${{ env.GO_LINT_VERSION }}
working-directory: api
skip-go-installation: true
args: --timeout 3m --verbose

test-engines-router:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ For **Unit** tests, we follow the convention of keeping it beside the main sourc

Setup [`pre-commit`](https://pre-commit.com/) to automatically lint and format the codebase on commit:

1. Ensure that you have Python (3.7 and above) with `pip`, installed.
1. Ensure that you have Python (3.8 and above) with `pip`, installed.
2. Install `pre-commit` with `pip` & install pre-push hooks

```sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ in these getting started guide.
- [Go](https://golang.org/dl/) v1.20
- [Node.js](https://nodejs.org/en/download/) v14 and yarn 1.22.x
- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.22 (optional)
- [Python](https://www.python.org/downloads/) >=3.7
- [Python](https://www.python.org/downloads/) >=3.8
- Local ports 80, 8080, 8081, 8082, 8200, 5000, 6443 should be available

### Download Turing Source Code
Expand Down Expand Up @@ -190,7 +190,7 @@ BatchEnsemblingConfig:
BuildTimeoutDuration: 20m
DestinationRegistry: ghcr.io
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:latest
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:latest
KanikoConfig:
BuildContextURI: git://github.com/caraml-dev/turing.git#refs/heads/main
DockerfileFilePath: engines/pyfunc-ensembler-job/app.Dockerfile
Expand Down
2 changes: 0 additions & 2 deletions api/config-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ BatchEnsemblingConfig:
DestinationRegistry: ghcr.io
SafeToEvict: false
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.7:v0.0.0-build.205-cf36433
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.8:v0.0.0-build.205-cf36433
3.9.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job-py3.9:v0.0.0-build.205-cf36433
KanikoConfig: &kanikoConfig
Expand All @@ -41,7 +40,6 @@ EnsemblerServiceBuilderConfig:
ImageBuildingConfig:
<<: *imageBuildingConfig
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.7:v0.0.0-build.205-cf36433
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.8:v0.0.0-build.205-cf36433
3.9.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service-py3.9:v0.0.0-build.205-cf36433
KanikoConfig:
Expand Down
4 changes: 2 additions & 2 deletions api/turing/config/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BatchEnsemblingConfig:
DestinationRegistry: ghcr.io
SafeToEvict: false
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:latest
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:latest
KanikoConfig: &kanikoConfig
BuildContextURI: git://github.com/caraml-dev/turing.git#refs/heads/main
DockerfileFilePath: engines/pyfunc-ensembler-job/app.Dockerfile
Expand All @@ -67,7 +67,7 @@ EnsemblerServiceBuilderConfig:
ImageBuildingConfig:
<<: *imageBuildingConfig
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:latest
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:latest
KanikoConfig:
<<: *kanikoConfig
DockerfileFilePath: engines/pyfunc-ensembler-service/app.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion engines/pyfunc-ensembler-job/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL := /bin/bash

PYTHON_VERSION ?= 3.7
PYTHON_VERSION ?= 3.8
APP_NAME := pyfunc-ensembler-job-py$(PYTHON_VERSION)
CONDA_ENV_NAME ?= $(APP_NAME)
ACTIVATE_ENV = source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate $(CONDA_ENV_NAME)
Expand Down
3 changes: 2 additions & 1 deletion engines/pyfunc-ensembler-job/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ py4j==0.10.9
pyarrow>=0.14.1,<=9.0.0
pyspark==3.0.1
pyyaml==6.0
file:../../sdk
#TODO: Update turing-sdk dep to: file:../../sdk
turing-sdk==0.11.0 # Pin to the version that supports Python 3.7.
2 changes: 1 addition & 1 deletion engines/pyfunc-ensembler-service/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL := /bin/bash

PYTHON_VERSION ?= 3.7
PYTHON_VERSION ?= 3.8
APP_NAME := pyfunc-ensembler-service-py$(PYTHON_VERSION)
CONDA_ENV_NAME ?= $(APP_NAME)
ACTIVATE_ENV = source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate $(CONDA_ENV_NAME)
Expand Down
3 changes: 2 additions & 1 deletion engines/pyfunc-ensembler-service/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ argparse>=1.4.0
cloudpickle==2.0.0
orjson==3.6.8
tornado==6.1
file:../../sdk
#TODO: Update turing-sdk dep to: file:../../sdk
turing-sdk==0.11.0 # Pin to the version that supports Python 3.7.
2 changes: 1 addition & 1 deletion infra/charts/turing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ turing:
DestinationRegistry: ghcr.io
SafeToEvict: false
BaseImageRef:
3.7.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:latest
3.8.*: ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:latest
KanikoConfig:
BuildContextURI: git://github.com/caraml-dev/turing.git#refs/heads/main
DockerfileFilePath: engines/pyfunc-ensembler-service/app.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Check out [samples](./samples) for examples on how to use Turing SDK.

#### Prerequisites

* Python >=3.7,<3.10
* Python >=3.8,<3.10
* openapi-generator >= 5.1.0 (`brew install openapi-generator`)

### Make commands
Expand Down
2 changes: 1 addition & 1 deletion sdk/samples/router/create_router_with_pyfunc_ensembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def main(turing_api: str, project: str):
ensembler_instance=SampleEnsembler(),
conda_env={
"dependencies": [
"python>=3.7.0",
"python>=3.8.0",
# other dependencies, if required
]
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
packages=setuptools.find_packages(exclude=["docs", "e2e", "samples", "tests"]),
install_requires=requirements,
extras_require={"dev": dev_requirements},
python_requires=">=3.7,<3.11",
python_requires=">=3.8,<3.11",
long_description=pathlib.Path("./docs/README.md").read_text(),
long_description_content_type="text/markdown",
)

0 comments on commit 7fa5d36

Please sign in to comment.