Skip to content

Commit

Permalink
Merge branch 'master' into pillow
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
  • Loading branch information
yuzisun committed May 4, 2024
2 parents d0d256b + a3fda9c commit 692782a
Show file tree
Hide file tree
Showing 229 changed files with 67,174 additions and 2,957 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ exclude =
python/kserve/kserve/protocol/grpc/grpc_predict_v2*.py
python/*_pb2.py
docs/**/*.py
python/kserve/kserve/protocol/rest/openai/types/openapi.py
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ Please also list any relevant details for your test configuration.
```release-note
```

**Re-running failed tests**

- `/rerun-all` - rerun all failed workflows.
- `/rerun-workflow <workflow name>` - rerun a specific failed workflow. Only one workflow name can be specified. Multiple /rerun-workflow commands are allowed per comment.
28 changes: 18 additions & 10 deletions .github/workflows/artexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file artexplainer.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/artexplainer.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -49,7 +56,8 @@ jobs:
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/cherry-pick.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/comment-cherry-pick.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Cherry Pick On Comment

on:
issue_comment:
types: [created]

jobs:
cherry-pick:

name: Cherry Pick
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.author_association == 'CONTRIBUTOR'
runs-on: ubuntu-latest

steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Cherry Pick
uses: hianhianhian/gha-cherry-pick@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 32 additions & 20 deletions .github/workflows/custom-model-grpc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file custom_model_grpc.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/custom_model_grpc.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -49,15 +52,16 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Build image
run: |
cd python
docker buildx build . --file custom_model_grpc.Dockerfile --tag $IMAGE_NAME
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -73,8 +77,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/custom_model_grpc.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
69 changes: 69 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ env:
PMML_IMG: "pmmlserver"
PADDLE_IMG: "paddleserver"
CUSTOM_MODEL_GRPC_IMG: "custom-model-grpc"
HUGGINGFACE_IMG: "huggingfaceserver"
# Explainer images
ART_IMG: "art-explainer"
# Transformer images
Expand Down Expand Up @@ -199,6 +200,14 @@ jobs:
compression-level: 0
if-no-files-found: error

- name: Upload huggingface image
uses: actions/upload-artifact@v4
with:
name: ${{ env.HUGGINGFACE_IMG }}-${{ github.sha }}
path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.HUGGINGFACE_IMG }}-${{ github.sha }}
compression-level: 0
if-no-files-found: error

explainer-runtime-build:
runs-on: ubuntu-latest
needs: [poetry-check]
Expand Down Expand Up @@ -847,3 +856,63 @@ jobs:
if: always()
run: |
./test/scripts/gh-actions/status-check.sh "kourier"
test-llm:
runs-on: ubuntu-latest
needs:
[ kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Setup Minikube
uses: ./.github/actions/minikube-setup

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup

- name: Download base images
uses: ./.github/actions/base-download

- name: Download huggingface server image
uses: actions/download-artifact@v4
with:
name: ${{ env.HUGGINGFACE_IMG }}-${{ github.sha }}
path: ./tmp

- name: Load docker images
uses: ./.github/actions/load-docker-images
with:
directory: ./tmp

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

- name: Install KServe
run: |
./test/scripts/gh-actions/setup-kserve.sh
kubectl get pods -n kserve
kubectl describe pods -n kserve
- name: Run E2E tests
timeout-minutes: 30
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "llm" "2"
- name: Check system status
if: always()
run: |
./test/scripts/gh-actions/status-check.sh
6 changes: 1 addition & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
run: |
go get -v -t -d ./...
- name: Go lint
run: |
make fmt
- name: Test
id: test
run: |
Expand All @@ -57,4 +53,4 @@ jobs:
filename: coverage.json
label: coverage
message: ${{ steps.test.outputs.coverage }}
color: green
color: green
28 changes: 28 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read
pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56
args: --out-format=line-number

53 changes: 32 additions & 21 deletions .github/workflows/huggingface-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
cd python
docker buildx build . --file huggingface_server.Dockerfile
fi
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/huggingface_server.Dockerfile
push: false
# https://github.com/docker/buildx/issues/1533
provenance: false

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
Expand All @@ -58,15 +61,16 @@ jobs:
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Build image
run: |
cd python
docker buildx build . --file huggingface_server.Dockerfile --tag $IMAGE_NAME
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -82,9 +86,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
context: python
file: python/huggingface_server.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false

0 comments on commit 692782a

Please sign in to comment.