From bccd1e9cd5347207e61b957fb7b7382d2f78902e Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 11:47:17 -0800 Subject: [PATCH 1/8] adding new ci for m1 --- .github/workflows/regression_tests_cpu_m1.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/regression_tests_cpu_m1.yml diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml new file mode 100644 index 0000000000..9de5d2236c --- /dev/null +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -0,0 +1,47 @@ +name: Run Regression Tests on CPU + +on: + push: + branches: + - M1_changes + pull_request: + branches: + - M1_changes + merge_group: + +concurrency: + group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true + +jobs: + regression-cpu: + # creates workflows for OS: ubuntu, macOS + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-14] + steps: + - name: Setup Python 3.8 + uses: actions/setup-python@v3 + with: + python-version: 3.8 + architecture: x64 + - name: Setup Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + - name: Checkout TorchServe + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install dependencies + run: | + python ts_scripts/install_dependencies.py --environment=dev + - name: Torchserve sanity test + run: | + python torchserve_sanity.py + - name: Torchserve Regression Tests + run: | + python test/regression_tests.py From 6d3755e66c08b643f4308e2c7105245a9b5d543f Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 11:57:07 -0800 Subject: [PATCH 2/8] removing python setup --- .github/workflows/regression_tests_cpu_m1.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index 9de5d2236c..9706a2caaf 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -22,11 +22,11 @@ jobs: matrix: os: [macos-14] steps: - - name: Setup Python 3.8 - uses: actions/setup-python@v3 - with: - python-version: 3.8 - architecture: x64 + # - name: Setup Python 3.10 + # uses: actions/setup-python@v3 + # with: + # python-version: 3.8 + # architecture: x64 - name: Setup Java 17 uses: actions/setup-java@v3 with: From a8feaed98c3851ba43488bc63412c7f291ccac8c Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 11:59:20 -0800 Subject: [PATCH 3/8] adding python 3.10 setup --- .github/workflows/regression_tests_cpu_m1.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index 9706a2caaf..09572f2ab6 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -22,11 +22,11 @@ jobs: matrix: os: [macos-14] steps: - # - name: Setup Python 3.10 - # uses: actions/setup-python@v3 - # with: - # python-version: 3.8 - # architecture: x64 + - name: Setup Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: 3.10 + architecture: x64 - name: Setup Java 17 uses: actions/setup-java@v3 with: From cdb28b2cd2f88b97501e770bfa17a844d5bbadb1 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 12:03:20 -0800 Subject: [PATCH 4/8] adding python 3.10 setup --- .github/workflows/regression_tests_cpu_m1.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index 09572f2ab6..476b097243 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -22,11 +22,11 @@ jobs: matrix: os: [macos-14] steps: - - name: Setup Python 3.10 - uses: actions/setup-python@v4 + # - name: Setup Python 3.10 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.10 - architecture: x64 + python-version: '3.10' - name: Setup Java 17 uses: actions/setup-java@v3 with: From ddcee1ec8f568f39d02e2f13ba7b9727e230b8a6 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 13:36:07 -0800 Subject: [PATCH 5/8] removed sanity test --- .github/workflows/regression_tests_cpu_m1.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index 476b097243..e9b2b3ab56 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -15,16 +15,15 @@ concurrency: jobs: regression-cpu: - # creates workflows for OS: ubuntu, macOS + # creates workflows for Mac OS M1 runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [macos-14] steps: - # - name: Setup Python 3.10 - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Setup Python 3.10 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Setup Java 17 @@ -39,9 +38,6 @@ jobs: - name: Install dependencies run: | python ts_scripts/install_dependencies.py --environment=dev - - name: Torchserve sanity test - run: | - python torchserve_sanity.py - name: Torchserve Regression Tests run: | python test/regression_tests.py From b10c3c267951bd49fd43c0ddc6f2f01cdc0d6045 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 14:01:49 -0800 Subject: [PATCH 6/8] adding m1 to normal tests and ci --- .github/workflows/ci_cpu.yml | 26 +++--- .github/workflows/regression_tests_cpu.yml | 18 +++-- .github/workflows/regression_tests_cpu_m1.yml | 80 +++++++++---------- 3 files changed, 68 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ci_cpu.yml b/.github/workflows/ci_cpu.yml index 85951f1e88..a2dbdec8f9 100644 --- a/.github/workflows/ci_cpu.yml +++ b/.github/workflows/ci_cpu.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: push: branches: - - master + - M1_changes pull_request: branches: - - master + - M1_changes merge_group: @@ -21,9 +21,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macOS-latest] + os: [ubuntu-20.04, macOS-latest, macos-14] steps: - - name: Setup Python 3.8 + - name: Setup Python for M1 + if: matrix.os == 'macos-14' + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup Python for all other OS + if: matrix.os != 'macos-14' uses: actions/setup-python@v4 with: python-version: 3.8 @@ -50,9 +56,9 @@ jobs: python torchserve_sanity.py # Any coverage.xml will be picked up by this step # Just make sure each coverage.xml is in a different folder - - name: Upload codecov - if: matrix.os == 'ubuntu-20.04' - run : | - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov + # - name: Upload codecov + # if: matrix.os == 'ubuntu-20.04' + # run : | + # curl -Os https://uploader.codecov.io/latest/linux/codecov + # chmod +x codecov + # ./codecov diff --git a/.github/workflows/regression_tests_cpu.yml b/.github/workflows/regression_tests_cpu.yml index 324c8cad05..188a17eb8f 100644 --- a/.github/workflows/regression_tests_cpu.yml +++ b/.github/workflows/regression_tests_cpu.yml @@ -3,10 +3,10 @@ name: Run Regression Tests on CPU on: push: branches: - - master + - M1_changes pull_request: branches: - - master + - M1_changes merge_group: concurrency: @@ -15,15 +15,21 @@ concurrency: jobs: regression-cpu: - # creates workflows for OS: ubuntu, macOS + # creates workflows for OS: ubuntu, macOS, macOS M1 runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macOS-latest] + os: [ubuntu-20.04, macOS-latest, macos-14] steps: - - name: Setup Python 3.8 - uses: actions/setup-python@v3 + - name: Setup Python for M1 + if: matrix.os == 'macos-14' + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup Python for all other OS + if: matrix.os != 'macos-14' + uses: actions/setup-python@v4 with: python-version: 3.8 architecture: x64 diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index e9b2b3ab56..14354e6992 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -1,43 +1,43 @@ -name: Run Regression Tests on CPU +# name: Run Regression Tests on CPU -on: - push: - branches: - - M1_changes - pull_request: - branches: - - M1_changes - merge_group: +# on: +# push: +# branches: +# - M1_changes +# pull_request: +# branches: +# - M1_changes +# merge_group: -concurrency: - group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} - cancel-in-progress: true +# concurrency: +# group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} +# cancel-in-progress: true -jobs: - regression-cpu: - # creates workflows for Mac OS M1 - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-14] - steps: - - name: Setup Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Setup Java 17 - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '17' - - name: Checkout TorchServe - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Install dependencies - run: | - python ts_scripts/install_dependencies.py --environment=dev - - name: Torchserve Regression Tests - run: | - python test/regression_tests.py +# jobs: +# regression-cpu: +# # creates workflows for Mac OS M1 +# runs-on: ${{ matrix.os }} +# strategy: +# fail-fast: false +# matrix: +# os: [macos-14] +# steps: +# - name: Setup Python 3.10 +# uses: actions/setup-python@v5 +# with: +# python-version: '3.10' +# - name: Setup Java 17 +# uses: actions/setup-java@v3 +# with: +# distribution: 'zulu' +# java-version: '17' +# - name: Checkout TorchServe +# uses: actions/checkout@v3 +# with: +# submodules: recursive +# - name: Install dependencies +# run: | +# python ts_scripts/install_dependencies.py --environment=dev +# - name: Torchserve Regression Tests +# run: | +# python test/regression_tests.py From 0060b39eb5f9ee64acd72deaa0fd1b3a14299d14 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 14:12:45 -0800 Subject: [PATCH 7/8] adding m1 to normal tests and ci --- .github/workflows/regression_tests_cpu_m1.yml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml index 14354e6992..544997fa00 100644 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ b/.github/workflows/regression_tests_cpu_m1.yml @@ -1,31 +1,31 @@ # name: Run Regression Tests on CPU -# on: -# push: -# branches: -# - M1_changes -# pull_request: -# branches: -# - M1_changes -# merge_group: +on: + push: + branches: + - M1_changes + pull_request: + branches: + - M1_changes + merge_group: -# concurrency: -# group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} -# cancel-in-progress: true +concurrency: + group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} + cancel-in-progress: true -# jobs: -# regression-cpu: -# # creates workflows for Mac OS M1 -# runs-on: ${{ matrix.os }} -# strategy: -# fail-fast: false -# matrix: -# os: [macos-14] -# steps: -# - name: Setup Python 3.10 -# uses: actions/setup-python@v5 -# with: -# python-version: '3.10' +jobs: + regression-cpu: + # creates workflows for Mac OS M1 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-14] + steps: + - name: Setup Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: '3.10' # - name: Setup Java 17 # uses: actions/setup-java@v3 # with: From 541cd7b2ebb2f3b5427955d2f84bc2c3b99bfee2 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Thu, 8 Feb 2024 15:08:37 -0800 Subject: [PATCH 8/8] add m1 tests to regression --- .github/workflows/ci_cpu.yml | 16 +++---- .github/workflows/regression_tests_cpu.yml | 4 +- .github/workflows/regression_tests_cpu_m1.yml | 43 ------------------- 3 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/regression_tests_cpu_m1.yml diff --git a/.github/workflows/ci_cpu.yml b/.github/workflows/ci_cpu.yml index a2dbdec8f9..9e33b89780 100644 --- a/.github/workflows/ci_cpu.yml +++ b/.github/workflows/ci_cpu.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: push: branches: - - M1_changes + - master pull_request: branches: - - M1_changes + - master merge_group: @@ -56,9 +56,9 @@ jobs: python torchserve_sanity.py # Any coverage.xml will be picked up by this step # Just make sure each coverage.xml is in a different folder - # - name: Upload codecov - # if: matrix.os == 'ubuntu-20.04' - # run : | - # curl -Os https://uploader.codecov.io/latest/linux/codecov - # chmod +x codecov - # ./codecov + - name: Upload codecov + if: matrix.os == 'ubuntu-20.04' + run : | + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov diff --git a/.github/workflows/regression_tests_cpu.yml b/.github/workflows/regression_tests_cpu.yml index 188a17eb8f..67f36841b4 100644 --- a/.github/workflows/regression_tests_cpu.yml +++ b/.github/workflows/regression_tests_cpu.yml @@ -3,10 +3,10 @@ name: Run Regression Tests on CPU on: push: branches: - - M1_changes + - master pull_request: branches: - - M1_changes + - master merge_group: concurrency: diff --git a/.github/workflows/regression_tests_cpu_m1.yml b/.github/workflows/regression_tests_cpu_m1.yml deleted file mode 100644 index 544997fa00..0000000000 --- a/.github/workflows/regression_tests_cpu_m1.yml +++ /dev/null @@ -1,43 +0,0 @@ -# name: Run Regression Tests on CPU - -on: - push: - branches: - - M1_changes - pull_request: - branches: - - M1_changes - merge_group: - -concurrency: - group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} - cancel-in-progress: true - -jobs: - regression-cpu: - # creates workflows for Mac OS M1 - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-14] - steps: - - name: Setup Python 3.10 - uses: actions/setup-python@v5 - with: - python-version: '3.10' -# - name: Setup Java 17 -# uses: actions/setup-java@v3 -# with: -# distribution: 'zulu' -# java-version: '17' -# - name: Checkout TorchServe -# uses: actions/checkout@v3 -# with: -# submodules: recursive -# - name: Install dependencies -# run: | -# python ts_scripts/install_dependencies.py --environment=dev -# - name: Torchserve Regression Tests -# run: | -# python test/regression_tests.py