From 887cc33c5e84212c2121c5bb9f5946577c9d42cf Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Thu, 4 Jul 2024 15:59:55 +1000 Subject: [PATCH 1/2] Revert "ci: do not overwrite already published images" This reverts commit b128d1ae4e3cce7690476d1182a229df8623ecab. Signed-off-by: Sunil Thaha --- .github/workflows/push-to-main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-to-main.yml b/.github/workflows/push-to-main.yml index 5862498a..c59d8568 100644 --- a/.github/workflows/push-to-main.yml +++ b/.github/workflows/push-to-main.yml @@ -4,7 +4,7 @@ on: - main env: - TAG: "latest" + TAG: "v0.7.7" jobs: check-branch: @@ -84,4 +84,4 @@ jobs: self_hosted_github_token: ${{ secrets.GH_SELF_HOSTED_RUNNER_TOKEN }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws_region: ${{ secrets.AWS_REGION }} + aws_region: ${{ secrets.AWS_REGION }} \ No newline at end of file From 253e42055306a9befdde850808a39ae1ddfd343c Mon Sep 17 00:00:00 2001 From: Sunil Thaha Date: Thu, 4 Jul 2024 16:00:07 +1000 Subject: [PATCH 2/2] Revert "chore(python): upgrade to 3.10" This reverts commit 49412516dee5eb62bb47eae7156e250065cbf31d. Signed-off-by: Sunil Thaha --- Makefile | 16 ++++++++-------- dockerfiles/Dockerfile | 2 +- dockerfiles/Dockerfile.base | 4 ++-- dockerfiles/Dockerfile.test | 2 +- dockerfiles/Dockerfile.test-nobase | 4 ++-- .../base/patch/patch-estimator-sidecar.yaml | 4 ++-- manifests/offline-trainer/offline-trainer.yaml | 4 ++-- manifests/server/online-train/patch-trainer.yaml | 2 +- manifests/server/server.yaml | 4 ++-- manifests/test/file-server.yaml | 6 +++--- manifests/test/model-request-client.yaml | 2 +- manifests/test/power-request-client.yaml | 2 +- model_training/s3/Dockerfile | 2 +- model_training/tekton/pipelines/collect.yaml | 6 +++--- .../tekton/pipelines/complete-train.yaml | 6 +++--- .../tekton/pipelines/single-train.yaml | 6 +++--- model_training/tekton/tasks/extract-task.yaml | 4 ++-- model_training/tekton/tasks/isolate-task.yaml | 4 ++-- .../tekton/tasks/original-pipeline-task.yaml | 4 ++-- model_training/tekton/tasks/s3/aws-s3-load.yaml | 4 ++-- model_training/tekton/tasks/s3/aws-s3-push.yaml | 4 ++-- .../tekton/tasks/s3/ibmcloud-s3-load.yaml | 4 ++-- .../tekton/tasks/s3/ibmcloud-s3-push.yaml | 4 ++-- model_training/tekton/tasks/train-task.yaml | 4 ++-- pyproject.toml | 6 +++--- src/server/model_server.py | 2 +- 26 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Makefile b/Makefile index c2d9545b..7688fd9d 100644 --- a/Makefile +++ b/Makefile @@ -31,14 +31,14 @@ exec-test: test-pipeline: mkdir -p ${MODEL_PATH} - $(CTR_CMD) run --platform linux/amd64 -v ${MODEL_PATH}:/mnt/models -i $(TEST_IMAGE) /bin/bash -c "python3.10 -u ./tests/pipeline_test.py" + $(CTR_CMD) run --platform linux/amd64 -v ${MODEL_PATH}:/mnt/models -i $(TEST_IMAGE) /bin/bash -c "python3.8 -u ./tests/pipeline_test.py" # test collector --> estimator run-estimator: - $(CTR_CMD) run -d --platform linux/amd64 -e "MODEL_TOPURL=http://localhost:8110" -v ${MODEL_PATH}:/mnt/models -p 8100:8100 --name estimator $(TEST_IMAGE) /bin/bash -c "python3.10 tests/http_server.py & sleep 5 && python3.10 src/estimate/estimator.py" + $(CTR_CMD) run -d --platform linux/amd64 -e "MODEL_TOPURL=http://localhost:8110" -v ${MODEL_PATH}:/mnt/models -p 8100:8100 --name estimator $(TEST_IMAGE) /bin/bash -c "python3.8 tests/http_server.py & sleep 5 && python3.8 src/estimate/estimator.py" run-collector-client: - $(CTR_CMD) exec estimator /bin/bash -c "while [ ! -S "/tmp/estimator.sock" ]; do sleep 1; done; python3.10 -u ./tests/estimator_power_request_test.py" + $(CTR_CMD) exec estimator /bin/bash -c "while [ ! -S "/tmp/estimator.sock" ]; do sleep 1; done; python3.8 -u ./tests/estimator_power_request_test.py" clean-estimator: $(CTR_CMD) stop estimator @@ -48,11 +48,11 @@ test-estimator: run-estimator run-collector-client clean-estimator # test estimator --> model-server run-model-server: - $(CTR_CMD) run -d --platform linux/amd64 -e "MODEL_TOPURL=http://localhost:8110" -v ${MODEL_PATH}:/mnt/models -p 8100:8100 --name model-server $(TEST_IMAGE) /bin/bash -c "python3.10 tests/http_server.py & sleep 10 && python3.10 src/server/model_server.py" + $(CTR_CMD) run -d --platform linux/amd64 -e "MODEL_TOPURL=http://localhost:8110" -v ${MODEL_PATH}:/mnt/models -p 8100:8100 --name model-server $(TEST_IMAGE) /bin/bash -c "python3.8 tests/http_server.py & sleep 10 && python3.8 src/server/model_server.py" while ! docker logs model-server | grep -q Serving; do echo "waiting for model-server to serve"; sleep 5; done run-estimator-client: - $(CTR_CMD) exec model-server /bin/bash -c "python3.10 -u ./tests/estimator_model_request_test.py" + $(CTR_CMD) exec model-server /bin/bash -c "python3.8 -u ./tests/estimator_model_request_test.py" clean-model-server: @$(CTR_CMD) stop model-server @@ -62,11 +62,11 @@ test-model-server: run-model-server run-estimator-client clean-model-server # test offline trainer run-offline-trainer: - $(CTR_CMD) run -d --platform linux/amd64 -p 8102:8102 --name offline-trainer $(TEST_IMAGE) python3.10 src/train/offline_trainer.py + $(CTR_CMD) run -d --platform linux/amd64 -p 8102:8102 --name offline-trainer $(TEST_IMAGE) python3.8 src/train/offline_trainer.py sleep 5 run-offline-trainer-client: - $(CTR_CMD) exec offline-trainer /bin/bash -c "python3.10 -u ./tests/offline_trainer_test.py" + $(CTR_CMD) exec offline-trainer /bin/bash -c "python3.8 -u ./tests/offline_trainer_test.py" clean-offline-trainer: @$(CTR_CMD) stop offline-trainer @@ -112,4 +112,4 @@ patch-power-request-client: kubectl patch ds kepler-exporter -n kepler --patch-file ./manifests/test/power-request-client.yaml patch-model-request-client: - kubectl patch ds kepler-exporter -n kepler --patch-file ./manifests/test/model-request-client.yaml + kubectl patch ds kepler-exporter -n kepler --patch-file ./manifests/test/model-request-client.yaml \ No newline at end of file diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index f1143555..290841bf 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -18,4 +18,4 @@ EXPOSE 8101 # port for Offline Trainer EXPOSE 8102 -ENTRYPOINT ["python3.10", "cmd/main.py"] +ENTRYPOINT ["python3.8", "cmd/main.py"] \ No newline at end of file diff --git a/dockerfiles/Dockerfile.base b/dockerfiles/Dockerfile.base index 4e390ad6..0b5b76b9 100644 --- a/dockerfiles/Dockerfile.base +++ b/dockerfiles/Dockerfile.base @@ -1,3 +1,3 @@ -FROM python:3.10-slim +FROM python:3.8-slim COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt \ No newline at end of file diff --git a/dockerfiles/Dockerfile.test b/dockerfiles/Dockerfile.test index d712b43a..e6fb2db7 100644 --- a/dockerfiles/Dockerfile.test +++ b/dockerfiles/Dockerfile.test @@ -24,4 +24,4 @@ EXPOSE 8101 # port for Offline Trainer EXPOSE 8102 -CMD [ "python3.10", "-u", "src/server/model_server.py" ] +CMD [ "python3.8", "-u", "src/server/model_server.py" ] \ No newline at end of file diff --git a/dockerfiles/Dockerfile.test-nobase b/dockerfiles/Dockerfile.test-nobase index 9f351f9a..4376aff2 100644 --- a/dockerfiles/Dockerfile.test-nobase +++ b/dockerfiles/Dockerfile.test-nobase @@ -1,5 +1,5 @@ # Include base requirements -FROM python:3.10-slim +FROM python:3.8-slim COPY dockerfiles/requirements.txt . RUN pip install --no-cache-dir -r requirements.txt @@ -25,4 +25,4 @@ EXPOSE 8101 # port for Offline Trainer EXPOSE 8102 -CMD [ "python3.10", "-u", "src/server/model_server.py" ] +CMD [ "python3.8", "-u", "src/server/model_server.py" ] \ No newline at end of file diff --git a/manifests/base/patch/patch-estimator-sidecar.yaml b/manifests/base/patch/patch-estimator-sidecar.yaml index 4eda1aba..5e946d1d 100644 --- a/manifests/base/patch/patch-estimator-sidecar.yaml +++ b/manifests/base/patch/patch-estimator-sidecar.yaml @@ -30,7 +30,7 @@ spec: name: kepler-exporter - image: kepler_model_server imagePullPolicy: IfNotPresent - command: [ "python3.10" ] + command: [ "python3.8" ] args: ["-u", "src/estimate/estimator.py" ] name: estimator volumeMounts: @@ -45,4 +45,4 @@ spec: - emptyDir: {} name: tmp - emptyDir: {} - name: mnt + name: mnt \ No newline at end of file diff --git a/manifests/offline-trainer/offline-trainer.yaml b/manifests/offline-trainer/offline-trainer.yaml index de752e8f..92df7399 100644 --- a/manifests/offline-trainer/offline-trainer.yaml +++ b/manifests/offline-trainer/offline-trainer.yaml @@ -38,7 +38,7 @@ spec: - name: mnt mountPath: /mnt readOnly: false - command: [ "python3.10" ] + command: [ "python3.8" ] args: ["-u", "src/train/offline_trainer.py" ] --- @@ -58,4 +58,4 @@ spec: ports: - name: http port: 8102 - targetPort: http + targetPort: http \ No newline at end of file diff --git a/manifests/server/online-train/patch-trainer.yaml b/manifests/server/online-train/patch-trainer.yaml index 1f4db512..759dee3c 100644 --- a/manifests/server/online-train/patch-trainer.yaml +++ b/manifests/server/online-train/patch-trainer.yaml @@ -30,5 +30,5 @@ spec: - name: mnt mountPath: /mnt readOnly: false - command: [ "python3.10" ] + command: [ "python3.8" ] args: ["-u", "src/train/online_trainer.py" ] diff --git a/manifests/server/server.yaml b/manifests/server/server.yaml index 0cf553b2..8041e732 100644 --- a/manifests/server/server.yaml +++ b/manifests/server/server.yaml @@ -44,7 +44,7 @@ spec: - name: mnt mountPath: /mnt readOnly: false - command: [ "python3.10" ] + command: [ "python3.8" ] args: ["-u", "src/server/model_server.py" ] --- kind: Service @@ -63,4 +63,4 @@ spec: ports: - name: http port: 8100 - targetPort: http + targetPort: http \ No newline at end of file diff --git a/manifests/test/file-server.yaml b/manifests/test/file-server.yaml index fdd0754b..98df4061 100644 --- a/manifests/test/file-server.yaml +++ b/manifests/test/file-server.yaml @@ -11,7 +11,7 @@ spec: image: localhost:5001/kepler_model_server:devel-test imagePullPolicy: IfNotPresent command: [ "/bin/sh" ] - args: ["-c", "python3.10 -u tests/http_server.py"] + args: ["-c", "python3.8 -u tests/http_server.py"] ports: - containerPort: 8110 name: http @@ -23,7 +23,7 @@ spec: image: localhost:5001/kepler_model_server:devel-test imagePullPolicy: IfNotPresent command: [ "/bin/sh" ] - args: ["-c", "python3.10 -u tests/minimal_trainer.py"] + args: ["-c", "python3.8 -u tests/minimal_trainer.py"] volumeMounts: - name: mnt mountPath: /mnt @@ -46,4 +46,4 @@ spec: ports: - name: http port: 8110 - targetPort: http + targetPort: http \ No newline at end of file diff --git a/manifests/test/model-request-client.yaml b/manifests/test/model-request-client.yaml index 643f6920..c2d4235a 100644 --- a/manifests/test/model-request-client.yaml +++ b/manifests/test/model-request-client.yaml @@ -11,7 +11,7 @@ spec: image: localhost:5001/kepler_model_server:devel-test imagePullPolicy: IfNotPresent command: [ "/bin/sh" ] - args: ["-c", "python3.10 -u tests/weight_model_request_test.py && echo Done && sleep infinity"] + args: ["-c", "python3.8 -u tests/weight_model_request_test.py && echo Done && sleep infinity"] volumeMounts: - name: cfm mountPath: /etc/kepler/kepler.config diff --git a/manifests/test/power-request-client.yaml b/manifests/test/power-request-client.yaml index 69acadf3..d5b747b4 100644 --- a/manifests/test/power-request-client.yaml +++ b/manifests/test/power-request-client.yaml @@ -11,7 +11,7 @@ spec: image: localhost:5001/kepler_model_server:devel-test imagePullPolicy: IfNotPresent command: [ "/bin/sh" ] - args: ["-c", "until [ -e /tmp/estimator.sock ]; do sleep 1; done && python3.10 -u tests/estimator_power_request_test.py && echo Done && sleep infinity"] + args: ["-c", "until [ -e /tmp/estimator.sock ]; do sleep 1; done && python3.8 -u tests/estimator_power_request_test.py && echo Done && sleep infinity"] volumeMounts: - name: cfm mountPath: /etc/kepler/kepler.config diff --git a/model_training/s3/Dockerfile b/model_training/s3/Dockerfile index 24c8e64f..b2123d28 100644 --- a/model_training/s3/Dockerfile +++ b/model_training/s3/Dockerfile @@ -6,4 +6,4 @@ COPY . /usr/local RUN pip install boto3 ibm-cos-sdk -ENTRYPOINT ["python3.10"] +ENTRYPOINT ["python3.8"] \ No newline at end of file diff --git a/model_training/tekton/pipelines/collect.yaml b/model_training/tekton/pipelines/collect.yaml index 9f3a8d23..f0d776c1 100644 --- a/model_training/tekton/pipelines/collect.yaml +++ b/model_training/tekton/pipelines/collect.yaml @@ -96,7 +96,7 @@ spec: - --benchmark=idle - -o=idle - --id=$(params.MACHINE_ID) - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -151,7 +151,7 @@ spec: - --id=$(params.MACHINE_ID) - --benchmark=stressng - -o=kepler_query - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -190,4 +190,4 @@ spec: - name: MACHINE_ID value: $(params.MACHINE_ID) taskRef: - name: aws-s3-push + name: aws-s3-push \ No newline at end of file diff --git a/model_training/tekton/pipelines/complete-train.yaml b/model_training/tekton/pipelines/complete-train.yaml index 542b5732..5d86c5c4 100644 --- a/model_training/tekton/pipelines/complete-train.yaml +++ b/model_training/tekton/pipelines/complete-train.yaml @@ -112,7 +112,7 @@ spec: - --benchmark=idle - -o=idle - --id=$(params.MACHINE_ID) - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -167,7 +167,7 @@ spec: - --benchmark=stressng - -o=kepler_query - --id=$(params.MACHINE_ID) - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -231,4 +231,4 @@ spec: - name: MACHINE_ID value: $(params.MACHINE_ID) taskRef: - name: aws-s3-push + name: aws-s3-push \ No newline at end of file diff --git a/model_training/tekton/pipelines/single-train.yaml b/model_training/tekton/pipelines/single-train.yaml index c439e8f0..a007afbc 100644 --- a/model_training/tekton/pipelines/single-train.yaml +++ b/model_training/tekton/pipelines/single-train.yaml @@ -120,7 +120,7 @@ spec: - --benchmark=idle - -o=idle - --id=$(params.MACHINE_ID) - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -175,7 +175,7 @@ spec: - --benchmark=stressng - -o=kepler_query - --id=$(params.MACHINE_ID) - command: ["python3.10"] + command: ["python3.8"] env: - name: PROM_SERVER value: http://prometheus-k8s.monitoring.svc:9090 @@ -323,4 +323,4 @@ spec: - name: MACHINE_ID value: $(params.MACHINE_ID) taskRef: - name: aws-s3-push + name: aws-s3-push \ No newline at end of file diff --git a/model_training/tekton/tasks/extract-task.yaml b/model_training/tekton/tasks/extract-task.yaml index 29d329e8..dfb17240 100644 --- a/model_training/tekton/tasks/extract-task.yaml +++ b/model_training/tekton/tasks/extract-task.yaml @@ -37,7 +37,7 @@ spec: steps: - name: extract image: $(params.MODEL_SERVER_IMAGE) - command: ["python3.10"] + command: ["python3.8"] args: - cmd/main.py - extract @@ -48,4 +48,4 @@ spec: - --feature-group=$(params.FEATURE_GROUP) - --energy-source=$(params.ENERGY_SOURCE) - --output-type=$(params.OUTPUT_TYPE) - - --thirdparty-metrics="$(params.THIRDPARTY_METRICS)" + - --thirdparty-metrics="$(params.THIRDPARTY_METRICS)" \ No newline at end of file diff --git a/model_training/tekton/tasks/isolate-task.yaml b/model_training/tekton/tasks/isolate-task.yaml index 30bae32b..abfebaa5 100644 --- a/model_training/tekton/tasks/isolate-task.yaml +++ b/model_training/tekton/tasks/isolate-task.yaml @@ -47,7 +47,7 @@ spec: steps: - name: isolate image: $(params.MODEL_SERVER_IMAGE) - command: ["python3.10"] + command: ["python3.8"] args: - cmd/main.py - isolate @@ -64,4 +64,4 @@ spec: - --abs-pipeline-name=$(params.ABS_PIPELINE_NAME) - --profile=idle - --target-hints="$(params.TARGET_HINTS)" - - --bg-hints="$(params.BG_HINTS)" + - --bg-hints="$(params.BG_HINTS)" \ No newline at end of file diff --git a/model_training/tekton/tasks/original-pipeline-task.yaml b/model_training/tekton/tasks/original-pipeline-task.yaml index f91d9bf0..9e626071 100644 --- a/model_training/tekton/tasks/original-pipeline-task.yaml +++ b/model_training/tekton/tasks/original-pipeline-task.yaml @@ -49,7 +49,7 @@ spec: steps: - name: pipeline-train image: $(params.MODEL_SERVER_IMAGE) - command: ["python3.10"] + command: ["python3.8"] env: - name: MODEL_PATH value: $(workspaces.mnt.path)/models @@ -68,4 +68,4 @@ spec: - --dyn-trainers=$(params.DYN_TRAINERS) - --energy-source=$(params.ENERGY_SOURCE) - --thirdparty-metrics="$(params.THIRDPARTY_METRICS)" - - --id=$(params.MACHINE_ID) + - --id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/model_training/tekton/tasks/s3/aws-s3-load.yaml b/model_training/tekton/tasks/s3/aws-s3-load.yaml index 13af627f..269e84f4 100644 --- a/model_training/tekton/tasks/s3/aws-s3-load.yaml +++ b/model_training/tekton/tasks/s3/aws-s3-load.yaml @@ -45,7 +45,7 @@ spec: secretKeyRef: name: $(params.COS_SECRET_NAME) key: bucketName - command: ["python3.10"] + command: ["python3.8"] args: - s3-loader.py - aws @@ -55,4 +55,4 @@ spec: - --bucket-name=$(BUCKET_NAME) - --mnt-path=$(workspaces.mnt.path) - --pipeline-name=$(params.PIPELINE_NAME) - - --machine-id=$(params.MACHINE_ID) + - --machine-id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/model_training/tekton/tasks/s3/aws-s3-push.yaml b/model_training/tekton/tasks/s3/aws-s3-push.yaml index 4381b778..6e3547b0 100644 --- a/model_training/tekton/tasks/s3/aws-s3-push.yaml +++ b/model_training/tekton/tasks/s3/aws-s3-push.yaml @@ -42,7 +42,7 @@ spec: secretKeyRef: name: $(params.COS_SECRET_NAME) key: bucketName - command: ["python3.10"] + command: ["python3.8"] args: - s3-pusher.py - aws @@ -53,4 +53,4 @@ spec: - --mnt-path=$(workspaces.mnt.path) - --query-data=kepler_query - --idle-data=idle - - --machine-id=$(params.MACHINE_ID) + - --machine-id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/model_training/tekton/tasks/s3/ibmcloud-s3-load.yaml b/model_training/tekton/tasks/s3/ibmcloud-s3-load.yaml index 5c6932ba..ef642704 100644 --- a/model_training/tekton/tasks/s3/ibmcloud-s3-load.yaml +++ b/model_training/tekton/tasks/s3/ibmcloud-s3-load.yaml @@ -45,7 +45,7 @@ spec: secretKeyRef: name: $(params.COS_SECRET_NAME) key: bucketName - command: ["python3.10"] + command: ["python3.8"] args: - s3-loader.py - ibmcloud @@ -55,4 +55,4 @@ spec: - --bucket-name=$(BUCKET_NAME) - --mnt-path=$(workspaces.mnt.path) - --pipeline-name=$(params.PIPELINE_NAME) - - --machine-id=$(params.MACHINE_ID) + - --machine-id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/model_training/tekton/tasks/s3/ibmcloud-s3-push.yaml b/model_training/tekton/tasks/s3/ibmcloud-s3-push.yaml index d8864581..93ed26bf 100644 --- a/model_training/tekton/tasks/s3/ibmcloud-s3-push.yaml +++ b/model_training/tekton/tasks/s3/ibmcloud-s3-push.yaml @@ -42,7 +42,7 @@ spec: secretKeyRef: name: $(params.COS_SECRET_NAME) key: bucketName - command: ["python3.10"] + command: ["python3.8"] args: - s3-pusher.py - ibmcloud @@ -53,4 +53,4 @@ spec: - --mnt-path=$(workspaces.mnt.path) - --query-data=kepler_query - --idle-data=idle - - --machine-id=$(params.MACHINE_ID) + - --machine-id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/model_training/tekton/tasks/train-task.yaml b/model_training/tekton/tasks/train-task.yaml index 021c9cf0..3679e475 100644 --- a/model_training/tekton/tasks/train-task.yaml +++ b/model_training/tekton/tasks/train-task.yaml @@ -43,7 +43,7 @@ spec: steps: - name: train-from-data image: $(params.MODEL_SERVER_IMAGE) - command: ["python3.10"] + command: ["python3.8"] env: - name: MODEL_PATH value: $(workspaces.mnt.path)/models @@ -58,4 +58,4 @@ spec: - --output-type=$(params.OUTPUT_TYPE) - --trainers=$(params.TRAINERS) - --thirdparty-metrics="$(params.THIRDPARTY_METRICS)" - - --id=$(params.MACHINE_ID) + - --id=$(params.MACHINE_ID) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 552c4679..a70074ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "kepler-model-server" dynamic = ["version"] description = "kepler model server for serving kepler models" readme = "README.md" -requires-python = ">= 3.10" +requires-python = ">= 3.8" license = "Apache-2.0" keywords = [ "kepler", "models", @@ -22,7 +22,7 @@ authors = [ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.8", ] dependencies = [ "flask==2.1.2", @@ -64,7 +64,7 @@ packages = [ ] [tool.hatch.envs.default] -python = "3.10" +python = "3.8" extra-dependencies = [ "ipython", "ipdb", diff --git a/src/server/model_server.py b/src/server/model_server.py index 5a7accae..588834bd 100644 --- a/src/server/model_server.py +++ b/src/server/model_server.py @@ -19,7 +19,7 @@ from train import NodeTypeSpec, NodeTypeIndexCollection ############################################### -# model request # +# model request class ModelRequest: