Skip to content

Commit

Permalink
Merge branch 'master' into integrate_sanity_tests_with_pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
chauhang committed Oct 24, 2023
2 parents e17d88f + 9c52043 commit f72fc13
Show file tree
Hide file tree
Showing 230 changed files with 7,536 additions and 984 deletions.
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Configuration for Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"

# Configuration for frontend/gradle.properties
- package-ecosystem: "gradle"
directory: "/frontend"
schedule:
interval: "monthly"

# Configuration for plugins/gradle.properties
- package-ecosystem: "gradle"
directory: "/plugins"
schedule:
interval: "monthly"
13 changes: 13 additions & 0 deletions .github/pytorch-probot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tracking_issue: 2724

# List of workflows that will be re-run in case of failures
# https://github.com/pytorch/test-infra/blob/main/torchci/lib/bot/retryBot.ts
retryable_workflows:
- Run Regression Tests on Docker
- Run Regression Tests for CPU nightly binaries
- Push torchserve nightly
- Push Docker Nightly
- Docker CI
- CI CPU
- CI GPU
- Benchmark torchserve nightly
1 change: 1 addition & 0 deletions .github/workflows/ci_cpu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI CPU

on:
workflow_dispatch:
push:
branches:
- master
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI GPU

on:
workflow_dispatch:
push:
branches:
- master
Expand All @@ -20,11 +21,12 @@ jobs:
- name: Clean up previous run
run: |
echo "Cleaning up previous run"
cd $RUNNER_WORKSPACE
pwd
cd ..
pwd
rm -rf _tool
ls -la ./
# deletes all files in the current directory
sudo rm -rf ./* || true
# deletes all hidden files in a directory
sudo rm -rf ./.??* || true
ls -la ./
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -39,7 +41,7 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu117
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu121
- name: Torchserve Sanity
uses: nick-fields/retry@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name: "CodeQL"

on:
workflow_dispatch:
# run every day at 11:15am
schedule:
- cron: '15 11 * * *'
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/docker-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ name: Push Docker Nightly
on:
# run every day at 1:15pm
schedule:
- cron: '15 13 * * *'
- cron: "15 13 * * *"
jobs:
nightly:
runs-on: ubuntu-20.04
runs-on: [self-hosted, ci-gpu]
steps:
- name: Clean up previous run
run: |
echo "Cleaning up previous run"
ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
ls -la ./
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -22,13 +29,17 @@ jobs:
- name: Push Docker Nightly
run: |
cd docker
python docker_nightly.py
python docker_nightly.py --cleanup
- name: Push KServe Docker Nightly
run: |
cd kubernetes/kserve
python docker_nightly.py --cleanup
- name: Open issue on failure
if: ${{ failure() && github.event_name == 'schedule' }}
uses: dacbd/create-issue-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Nightly Docker build failed
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ''
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ""
6 changes: 0 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ jobs:
pip install pre-commit
pre-commit install
- name: Check links in all markdown files
uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
with:
use-verbose-mode: 'yes'
config-file: "ts_scripts/markdown_link_check_config.json"

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v29.0.4
Expand Down
26 changes: 1 addition & 25 deletions .github/workflows/official_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@ on: workflow_dispatch

jobs:
official-release:
# creates workflows for the 3 OS: ubuntu, macOS & windows
runs-on: ${{ matrix.os }}

runs-on: ubuntu-20.04
# The official-release environment requires 2 manual approvals
environment:
name: official-release
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, macOS-latest, windows-latest]
steps:
- name: Setup Conda
uses: s-weigand/setup-conda@v1
Expand Down Expand Up @@ -41,22 +35,4 @@ jobs:
- name: Push PyPI binaries
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
if: matrix.os == 'ubuntu-20.04'
run: python binaries/upload.py --upload-pypi-packages
- name: Login to Docker
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
if: matrix.os == 'ubuntu-20.04'
run: docker login --username pytorchbot --password "$DOCKER_PASSWORD"
- name: Build & Upload pytorch/torchserve Docker images
if: matrix.os == 'ubuntu-20.04'
run: |
cd docker
python build_upload_release.py
cd ..
- name: Build & Upload pytorch/torchserve-kfs Docker images
if: matrix.os == 'ubuntu-20.04'
run: |
cd kubernetes/kserve
python build_upload_release.py
cd ..
46 changes: 46 additions & 0 deletions .github/workflows/official_release_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Make an official Release of Docker Images

on:
workflow_dispatch:
inputs:
upload_docker:
description: 'Upload TorchServe Docker Images?'
required: true
default: 'no'
upload_kfs:
description: 'Upload TorchServe-kfs Docker Images?'
required: true
default: 'no'

jobs:
official-release-docker:
runs-on: [self-hosted, ci-gpu]
steps:
- name: Clean up previous run
run: |
echo "Cleaning up previous run"
ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
ls -la ./
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
architecture: x64
- name: Checkout TorchServe
uses: actions/checkout@v3
- name: Login to Docker
env:
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: docker login --username pytorchbot --password "$DOCKER_PASSWORD"
- name: Build & Upload pytorch/torchserve Docker images
if: github.event.inputs.upload_docker == 'yes'
run: |
cd docker
python build_upload_release.py --cleanup
- name: Build & Upload pytorch/torchserve-kfs Docker images
if: github.event.inputs.upload_kfs == 'yes'
run: |
cd kubernetes/kserve
python build_upload_release.py --cleanup
44 changes: 44 additions & 0 deletions .github/workflows/regression_tests_cpu_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run Regression Tests for CPU nightly binaries

on:
# run every day at 6:15am
schedule:
- cron: '15 6 * * *'

concurrency:
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
regression-cpu-nightly-binaries:
# creates workflows for OS: ubuntu, macOS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-latest]
python-version: ["3.8", "3.9", "3.10"]
binaries: ["pypi", "conda"]
steps:
- uses: actions/checkout@v3
- name: Setup conda with Python ${{ matrix.python-version }}
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- run: conda --version
- run: python --version
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Checkout TorchServe
uses: actions/checkout@v3
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev
- name: Torchserve Regression Tests
run: |
python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly
13 changes: 11 additions & 2 deletions .github/workflows/regression_tests_docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run Regression Tests on Docker

on:
workflow_dispatch:
# run every day at 5:15am
schedule:
- cron: '15 5 * * *'
Expand All @@ -25,7 +26,7 @@ jobs:
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
ls -la ./
docker system prune -f
docker system prune --all --volumes -f
- name: Checkout TorchServe
uses: actions/checkout@v3
- name: Branch name
Expand All @@ -40,7 +41,7 @@ jobs:
if: false == contains(matrix.hardware, 'ubuntu')
run: |
cd docker
./build_image.sh -g -cv cu117 -bt ci -n -b $GITHUB_REF_NAME -t pytorch/torchserve:ci
./build_image.sh -g -cv cu121 -bt ci -n -b $GITHUB_REF_NAME -t pytorch/torchserve:ci
- name: Torchserve GPU Regression Tests
if: false == contains(matrix.hardware, 'ubuntu')
run: |
Expand All @@ -53,3 +54,11 @@ jobs:
if: success()
run: |
docker system prune -f && docker rmi pytorch/torchserve:ci
- name: Open issue on failure
if: ${{ failure() && github.event_name == 'schedule' }}
uses: dacbd/create-issue-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Docker Regression on ${{ matrix.hardware }} failed
body: The daily scheduled [Docker Regression Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why
assignees: ''
6 changes: 4 additions & 2 deletions .github/workflows/regression_tests_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Run Regression Tests on GPU

on:
workflow_dispatch:
push:
branches:
- master
Expand All @@ -15,7 +16,7 @@ concurrency:

jobs:
regression-gpu:
# creates workflows for CUDA 11.6 & CUDA 11.7 on ubuntu
# creates workflows on self hosted runner
runs-on: [self-hosted, regression-test-gpu]
steps:
- name: Clean up previous run
Expand Down Expand Up @@ -43,7 +44,8 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu117
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu121
- name: Torchserve Regression Tests
run: |
export TS_RUN_IN_DOCKER=False
python test/regression_tests.py
54 changes: 54 additions & 0 deletions .github/workflows/regression_tests_gpu_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Run Regression Tests for GPU nightly binaries

on:
# run every day at 6:15am
workflow_dispatch:

concurrency:
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
regression-gpu-nightly-binaries:
# creates workflows for OS: ubuntu, macOS
runs-on: [self-hosted, regression-test-gpu]
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
binaries: ["pypi", "conda"]
steps:
- name: Clean up previous run
run: |
echo "Cleaning up previous run"
ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
ls -la ./
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Checkout TorchServe
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python ${{ matrix.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: conda --version
- run: python --version
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu118
- name: Torchserve Regression Tests
run: |
python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly
Loading

0 comments on commit f72fc13

Please sign in to comment.