From b820df46cb76e05caa481a5400caef82ef819c10 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Fri, 9 Feb 2024 14:58:46 -0800 Subject: [PATCH 01/23] testing m1 with binaries --- .../regression_tests_cpu_binaries.yml | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 1b454d20b3..ccaa065878 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -1,9 +1,13 @@ name: Run Regression Tests for CPU nightly binaries +# on: +# # run every day at 6:15am +# schedule: +# - cron: '15 6 * * *' on: - # run every day at 6:15am - schedule: - - cron: '15 6 * * *' + push: + branches: + - m1 concurrency: group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} @@ -44,3 +48,28 @@ jobs: - name: Validate Torchserve CPU Regression run: | python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + + regression-cpu-nightly-binaries-macos-14: + # Job for macOS-14 with Python 3.10 + runs-on: macos-14 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - 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 + - name: Install dependencies + run: | + python ts_scripts/install_dependencies.py --environment=dev + - name: Validate Torchserve CPU Regression + run: | + python test/regression_tests.py --binaries --nightly \ No newline at end of file From 1e04594f90ea052545db88bdf6d869275786ca76 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Fri, 9 Feb 2024 15:02:09 -0800 Subject: [PATCH 02/23] testing m1 with binaries 2 --- .github/workflows/regression_tests_cpu_binaries.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index ccaa065878..a8961103e9 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -52,6 +52,10 @@ jobs: regression-cpu-nightly-binaries-macos-14: # Job for macOS-14 with Python 3.10 runs-on: macos-14 + strategy: + fail-fast: false + matrix: + binaries: ["pypi", "conda"] steps: - uses: actions/checkout@v3 with: @@ -72,4 +76,4 @@ jobs: python ts_scripts/install_dependencies.py --environment=dev - name: Validate Torchserve CPU Regression run: | - python test/regression_tests.py --binaries --nightly \ No newline at end of file + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file From 2801b5c8c5758970ecf197d1cad5df729b78e274 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Fri, 9 Feb 2024 15:08:04 -0800 Subject: [PATCH 03/23] added conda setup --- .github/workflows/regression_tests_cpu_binaries.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index a8961103e9..4696c95300 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -60,10 +60,14 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - name: Setup Python 3.10 - uses: actions/setup-python@v5 + - name: Setup conda with Python 3.10 + uses: s-weigand/setup-conda@v1 with: - python-version: '3.10' + update-conda: true + python-version: 3.10 + conda-channels: anaconda, conda-forge + - run: conda --version + - run: python --version - name: Setup Java 17 uses: actions/setup-java@v3 with: From 18c6299603bc5eb68575700ae7ce6e85e76b1c52 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Fri, 9 Feb 2024 15:10:22 -0800 Subject: [PATCH 04/23] added python setup --- .github/workflows/regression_tests_cpu_binaries.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 4696c95300..30229f0669 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -60,6 +60,10 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: Setup Python for M1 + uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: Setup conda with Python 3.10 uses: s-weigand/setup-conda@v1 with: From f3dd61e288a95fe3f33ee1e4a8bea198b913f96c Mon Sep 17 00:00:00 2001 From: udaij12 Date: Fri, 9 Feb 2024 15:29:39 -0800 Subject: [PATCH 05/23] added python setup --- .github/workflows/regression_tests_cpu_binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 30229f0669..8d912a38b6 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -68,7 +68,7 @@ jobs: uses: s-weigand/setup-conda@v1 with: update-conda: true - python-version: 3.10 + python-version: '3.10' conda-channels: anaconda, conda-forge - run: conda --version - run: python --version From 405ef2bc56ccc3eb722d0009bc8355e19b2b3241 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 13:26:28 -0800 Subject: [PATCH 06/23] testing binaries --- .../regression_tests_cpu_binaries.yml | 85 ++++++++++--------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 753570b761..887f0d1fcc 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -14,43 +14,43 @@ concurrency: 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"] - exclude: - - os: macos-latest - python-version: 3.8 - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - 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: Validate Torchserve CPU Regression - run: | - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + # 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"] + # exclude: + # - os: macos-latest + # python-version: 3.8 + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + # - 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: Validate Torchserve CPU Regression + # run: | + # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly regression-cpu-nightly-binaries-macos-14: # Job for macOS-14 with Python 3.10 @@ -68,11 +68,16 @@ jobs: with: python-version: '3.10' - name: Setup conda with Python 3.10 - uses: s-weigand/setup-conda@v1 + uses: conda-incubator/setup-miniconda@v3 with: - update-conda: true + auto-update-conda: true python-version: '3.10' - conda-channels: anaconda, conda-forge + - name: Conda info + shell: bash -el {0} + run: conda info + - name: Conda list + shell: pwsh + run: conda list - run: conda --version - run: python --version - name: Setup Java 17 From 8440a2e0d30192c127ed161eee7067838bbf2fed Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 13:34:09 -0800 Subject: [PATCH 07/23] change order --- .../regression_tests_cpu_binaries.yml | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 887f0d1fcc..45dda18236 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -72,14 +72,6 @@ jobs: with: auto-update-conda: true python-version: '3.10' - - name: Conda info - shell: bash -el {0} - run: conda info - - name: Conda list - shell: pwsh - run: conda list - - run: conda --version - - run: python --version - name: Setup Java 17 uses: actions/setup-java@v3 with: @@ -87,9 +79,20 @@ jobs: java-version: '17' - name: Checkout TorchServe uses: actions/checkout@v3 - - name: Install dependencies - run: | - python ts_scripts/install_dependencies.py --environment=dev - - name: Validate Torchserve CPU Regression - run: | - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file + - name: Conda info + shell: bash -el {0} + run: conda info && + python ts_scripts/install_dependencies.py --environment=dev && + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + - name: Conda list + shell: pwsh + run: conda list + - run: conda --version + - run: python --version + + # - name: Install dependencies + # run: | + # python ts_scripts/install_dependencies.py --environment=dev + # - name: Validate Torchserve CPU Regression + # run: | + # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file From 37260ac7a4d0186024f3ec58de3cffc036690cb3 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 14:59:41 -0800 Subject: [PATCH 08/23] add channels --- .github/workflows/regression_tests_cpu_binaries.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 45dda18236..1df25fb717 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -71,6 +71,7 @@ jobs: uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true + channels: anaconda, conda-forge python-version: '3.10' - name: Setup Java 17 uses: actions/setup-java@v3 From 0c5db8847376e7c19154d92f111bd29bed7ef53f Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 15:16:56 -0800 Subject: [PATCH 09/23] changing conda setup --- .../regression_tests_cpu_binaries.yml | 54 +++++++++++++------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 1df25fb717..1d99fd0786 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -67,29 +67,53 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.10' - - name: Setup conda with Python 3.10 - uses: conda-incubator/setup-miniconda@v3 + - name: Setup Conda + uses: s-weigand/setup-conda@v1 with: - auto-update-conda: true - channels: anaconda, conda-forge + update-conda: true python-version: '3.10' + conda-channels: anaconda, conda-forge + - run: conda --version - name: Setup Java 17 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '17' - - name: Checkout TorchServe - uses: actions/checkout@v3 - - name: Conda info + - name: Install dependencies shell: bash -el {0} - run: conda info && - python ts_scripts/install_dependencies.py --environment=dev && - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - name: Conda list - shell: pwsh - run: conda list - - run: conda --version - - run: python --version + run: | + echo "=====CHECK ENV AND PYTHON VERSION====" + /home/ubuntu/actions-runner/_work/serve/serve/3/condabin/conda info --envs + python --version + echo "=====RUN INSTALL DEPENDENCIES====" + python ts_scripts/install_dependencies.py --environment=dev + - name: Torchserve Regression Tests + shell: bash -el {0} + run: | + echo "=====CHECK ENV AND PYTHON VERSION====" + /home/ubuntu/actions-runner/_work/serve/serve/3/condabin/conda info --envs + python --version + echo "=====RUN REGRESSION TESTS====" + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + + + # - name: Setup Java 17 + # uses: actions/setup-java@v3 + # with: + # distribution: 'zulu' + # java-version: '17' + # - name: Checkout TorchServe + # uses: actions/checkout@v3 + # - name: Conda info + # shell: bash -el {0} + # run: conda info && + # python ts_scripts/install_dependencies.py --environment=dev && + # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + # - name: Conda list + # shell: pwsh + # run: conda list + # - run: conda --version + # - run: python --version # - name: Install dependencies # run: | From cbca9a3a823470680c8d6c0a99a5c548bcef5d9c Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 15:19:38 -0800 Subject: [PATCH 10/23] changing conda setup --- .github/workflows/regression_tests_cpu_binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 1d99fd0786..8b495b90a7 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -68,7 +68,7 @@ jobs: with: python-version: '3.10' - name: Setup Conda - uses: s-weigand/setup-conda@v1 + uses: s-weigand/setup-conda@v2 with: update-conda: true python-version: '3.10' From 759a0e9e8b5c65a54ad4f7fb2c4e1625fbe8894f Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 15:21:41 -0800 Subject: [PATCH 11/23] changing conda setup 2 --- .../regression_tests_cpu_binaries.yml | 64 +++++-------------- 1 file changed, 17 insertions(+), 47 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 8b495b90a7..46b52cf85b 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -66,58 +66,28 @@ jobs: - name: Setup Python for M1 uses: actions/setup-python@v5 with: - python-version: '3.10' - - name: Setup Conda - uses: s-weigand/setup-conda@v2 - with: - update-conda: true python-version: '3.10' - conda-channels: anaconda, conda-forge - - run: conda --version - name: Setup Java 17 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '17' - - name: Install dependencies + - name: Checkout TorchServe + uses: actions/checkout@v3 + - name: Conda info shell: bash -el {0} - run: | - echo "=====CHECK ENV AND PYTHON VERSION====" - /home/ubuntu/actions-runner/_work/serve/serve/3/condabin/conda info --envs - python --version - echo "=====RUN INSTALL DEPENDENCIES====" - python ts_scripts/install_dependencies.py --environment=dev - - name: Torchserve Regression Tests - shell: bash -el {0} - run: | - echo "=====CHECK ENV AND PYTHON VERSION====" - /home/ubuntu/actions-runner/_work/serve/serve/3/condabin/conda info --envs - python --version - echo "=====RUN REGRESSION TESTS====" - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - - # - name: Setup Java 17 - # uses: actions/setup-java@v3 - # with: - # distribution: 'zulu' - # java-version: '17' - # - name: Checkout TorchServe - # uses: actions/checkout@v3 - # - name: Conda info - # shell: bash -el {0} - # run: conda info && - # python ts_scripts/install_dependencies.py --environment=dev && - # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - # - name: Conda list - # shell: pwsh - # run: conda list - # - run: conda --version - # - run: python --version + run: conda info && conda install -c pytorch torchserve torch-model-archiver torch-workflow-archiver && + python ts_scripts/install_dependencies.py --environment=dev && + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + - name: Conda list + shell: pwsh + run: conda list + - run: conda --version + - run: python --version - # - name: Install dependencies - # run: | - # python ts_scripts/install_dependencies.py --environment=dev - # - name: Validate Torchserve CPU Regression - # run: | - # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file + - name: Install dependencies + run: | + python ts_scripts/install_dependencies.py --environment=dev + - name: Validate Torchserve CPU Regression + run: | + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file From cf5d3491e59f67c0408b6b62752ebccabc9e27c0 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 15:25:40 -0800 Subject: [PATCH 12/23] changing conda setup 3 --- .github/workflows/regression_tests_cpu_binaries.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 46b52cf85b..bf974ea802 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -67,6 +67,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.10' + - name: Setup conda with Python 3.10 + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: anaconda, conda-forge + python-version: '3.10' - name: Setup Java 17 uses: actions/setup-java@v3 with: From bcb503f088c6d61d4a581cd335cb334046b45c9d Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 15:58:40 -0800 Subject: [PATCH 13/23] testing new install --- .../regression_tests_cpu_binaries.yml | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index bf974ea802..2f5e66f910 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -67,12 +67,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.10' - - name: Setup conda with Python 3.10 - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - channels: anaconda, conda-forge - python-version: '3.10' - name: Setup Java 17 uses: actions/setup-java@v3 with: @@ -80,20 +74,28 @@ jobs: java-version: '17' - name: Checkout TorchServe uses: actions/checkout@v3 + + - name: Setup conda + run: | + mkdir -p ~/miniconda3 + curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh + bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 + rm -rf ~/miniconda3/miniconda.sh + ~/miniconda3/bin/conda init bash + ~/miniconda3/bin/conda init zsh + - name: Conda info shell: bash -el {0} - run: conda info && conda install -c pytorch torchserve torch-model-archiver torch-workflow-archiver && - python ts_scripts/install_dependencies.py --environment=dev && - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - name: Conda list - shell: pwsh - run: conda list + run: | + conda info + # python ts_scripts/install_dependencies.py --environment=dev + # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - run: conda --version - run: python --version - - name: Install dependencies - run: | - python ts_scripts/install_dependencies.py --environment=dev - - name: Validate Torchserve CPU Regression - run: | - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file + # - name: Install dependencies + # run: | + # python ts_scripts/install_dependencies.py --environment=dev + # - name: Validate Torchserve CPU Regression + # run: | + # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file From cc29f8f4d92be71b3dcfce14278e7ad7699c7aa7 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 16:01:52 -0800 Subject: [PATCH 14/23] testing full tests --- .github/workflows/regression_tests_cpu_binaries.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 2f5e66f910..de47192d22 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -88,9 +88,8 @@ jobs: shell: bash -el {0} run: | conda info - # python ts_scripts/install_dependencies.py --environment=dev - # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - run: conda --version + python ts_scripts/install_dependencies.py --environment=dev + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - run: python --version # - name: Install dependencies From a7ccdec1f4c7cb1ae92c5c8ef86d871d2d88ad87 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Tue, 5 Mar 2024 16:05:59 -0800 Subject: [PATCH 15/23] activating env --- .github/workflows/regression_tests_cpu_binaries.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index de47192d22..1842aec777 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -87,6 +87,8 @@ jobs: - name: Conda info shell: bash -el {0} run: | + conda create --name myenv + conda activate myenv conda info python ts_scripts/install_dependencies.py --environment=dev python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly From 7c4f45d149f74a18d25ba65b95d1ad76a8bdf1ff Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 17:53:22 +0000 Subject: [PATCH 16/23] adding m1 binaries --- .../regression_tests_cpu_binaries.yml | 95 ++++--------------- binaries/conda/build_packages.py | 2 +- 2 files changed, 22 insertions(+), 75 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 1842aec777..acfc33e676 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -1,72 +1,39 @@ name: Run Regression Tests for CPU nightly binaries -# on: -# # run every day at 6:15am -# schedule: -# - cron: '15 6 * * *' on: - push: - branches: - - m1 + # 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"] - # exclude: - # - os: macos-latest - # python-version: 3.8 - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - # - 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: Validate Torchserve CPU Regression - # run: | - # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - regression-cpu-nightly-binaries-macos-14: - # Job for macOS-14 with Python 3.10 - runs-on: macos-14 + 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"] + exclude: + - os: macos-latest + python-version: 3.8 steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Setup Python for M1 - uses: actions/setup-python@v5 + - name: Setup conda with Python ${{ matrix.python-version }} + uses: s-weigand/setup-conda@v1 with: - python-version: '3.10' + 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: @@ -74,29 +41,9 @@ jobs: java-version: '17' - name: Checkout TorchServe uses: actions/checkout@v3 - - - name: Setup conda + - name: Install dependencies run: | - mkdir -p ~/miniconda3 - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh - bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 - rm -rf ~/miniconda3/miniconda.sh - ~/miniconda3/bin/conda init bash - ~/miniconda3/bin/conda init zsh - - - name: Conda info - shell: bash -el {0} + python ts_scripts/install_dependencies.py --environment=dev + - name: Validate Torchserve CPU Regression run: | - conda create --name myenv - conda activate myenv - conda info - python ts_scripts/install_dependencies.py --environment=dev python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - run: python --version - - # - name: Install dependencies - # run: | - # python ts_scripts/install_dependencies.py --environment=dev - # - name: Validate Torchserve CPU Regression - # run: | - # python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file diff --git a/binaries/conda/build_packages.py b/binaries/conda/build_packages.py index c2f657b03a..4fd8a5d82b 100644 --- a/binaries/conda/build_packages.py +++ b/binaries/conda/build_packages.py @@ -22,7 +22,7 @@ PACKAGES = ["torchserve", "torch-model-archiver", "torch-workflow-archiver"] # conda convert supported platforms https://docs.conda.io/projects/conda-build/en/stable/resources/commands/conda-convert.html -PLATFORMS = ["linux-64", "osx-64", "win-64"] # Add a new platform here +PLATFORMS = ["linux-64", "osx-64", "win-64", "osx-arm64"] # Add a new platform here if os.name == "nt": # Assumes miniconda is installed in windows From 2b979d4d36ecc04fb2fbd8dde6e6e4fde5a83af9 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 12:09:43 -0700 Subject: [PATCH 17/23] adding regression test --- .../regression_tests_cpu_binaries.yml | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index acfc33e676..c3176c9feb 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -1,9 +1,13 @@ name: Run Regression Tests for CPU nightly binaries +# on: +# # run every day at 6:15am +# schedule: +# - cron: '15 6 * * *' on: - # run every day at 6:15am - schedule: - - cron: '15 6 * * *' + push: + branches: + - m1 concurrency: group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} @@ -47,3 +51,41 @@ jobs: - name: Validate Torchserve CPU Regression run: | python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + + regression-cpu-nightly-binaries-macos-14: + # Job for macOS-14 with Python 3.10 + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + binaries: ["pypi", "conda"] + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Setup Python for M1 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup conda with Python 3.10 + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + 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 + - name: Conda info + shell: bash -el {0} + run: conda info && + python ts_scripts/install_dependencies.py --environment=dev && + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + - name: Conda list + shell: pwsh + run: conda list + - run: conda --version + - run: python --version \ No newline at end of file From 952a7dd1d44ad99802e3f5a0f429b7d8c908fdaa Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:20:59 -0700 Subject: [PATCH 18/23] changing tests back --- .../regression_tests_cpu_binaries.yml | 50 ++----------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index c3176c9feb..105a472977 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -1,13 +1,9 @@ name: Run Regression Tests for CPU nightly binaries -# on: -# # run every day at 6:15am -# schedule: -# - cron: '15 6 * * *' on: - push: - branches: - - m1 + # 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 }} @@ -50,42 +46,4 @@ jobs: python ts_scripts/install_dependencies.py --environment=dev - name: Validate Torchserve CPU Regression run: | - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - regression-cpu-nightly-binaries-macos-14: - # Job for macOS-14 with Python 3.10 - runs-on: macos-14 - strategy: - fail-fast: false - matrix: - binaries: ["pypi", "conda"] - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Setup Python for M1 - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Setup conda with Python 3.10 - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - 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 - - name: Conda info - shell: bash -el {0} - run: conda info && - python ts_scripts/install_dependencies.py --environment=dev && - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - name: Conda list - shell: pwsh - run: conda list - - run: conda --version - - run: python --version \ No newline at end of file + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file From 7c3c706dc832fbb55b89ef40c322afbe7e738f6d Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:27:48 -0700 Subject: [PATCH 19/23] testing nightly binary --- .../regression_tests_cpu_binaries.yml | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 105a472977..fd774486b3 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -46,4 +46,42 @@ jobs: python ts_scripts/install_dependencies.py --environment=dev - name: Validate Torchserve CPU Regression run: | - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly \ No newline at end of file + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + + regression-cpu-nightly-binaries-macos-14: + # Job for macOS-14 with Python 3.10 + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + binaries: ["pypi", "conda"] + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Setup Python for M1 + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Setup conda with Python 3.10 + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + 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 + - name: Conda info + shell: bash -el {0} + run: conda info && + python ts_scripts/install_dependencies.py --environment=dev && + python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly + - name: Conda list + shell: pwsh + run: conda list + - run: conda --version + - run: python --version \ No newline at end of file From e33b1edfec153243bbd14fbb47ddd812124c0d32 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:41:36 -0700 Subject: [PATCH 20/23] code cleanup --- .../regression_tests_cpu_binaries.yml | 43 ++----------------- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index fd774486b3..07310c346f 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -16,12 +16,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macOS-latest] + os: [ubuntu-20.04, macOS-latest, macos-14] python-version: ["3.8", "3.9", "3.10"] binaries: ["pypi", "conda"] exclude: - os: macos-latest python-version: 3.8 + - os: macos-14 + python-version: 3.8, 3.9 steps: - uses: actions/checkout@v3 with: @@ -47,41 +49,4 @@ jobs: - name: Validate Torchserve CPU Regression run: | python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - regression-cpu-nightly-binaries-macos-14: - # Job for macOS-14 with Python 3.10 - runs-on: macos-14 - strategy: - fail-fast: false - matrix: - binaries: ["pypi", "conda"] - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Setup Python for M1 - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Setup conda with Python 3.10 - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - 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 - - name: Conda info - shell: bash -el {0} - run: conda info && - python ts_scripts/install_dependencies.py --environment=dev && - python test/regression_tests.py --binaries --${{ matrix.binaries }} --nightly - - name: Conda list - shell: pwsh - run: conda list - - run: conda --version - - run: python --version \ No newline at end of file + \ No newline at end of file From 1b265a311028400d3a1d30c31c06bc5a5a49b2c8 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:51:24 -0700 Subject: [PATCH 21/23] adding conda for m1 --- .github/workflows/regression_tests_cpu_binaries.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 07310c346f..4bb40edcad 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -22,13 +22,19 @@ jobs: exclude: - os: macos-latest python-version: 3.8 - - os: macos-14 - python-version: 3.8, 3.9 steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Setup conda with Python ${{ matrix.python-version }} + - name: Setup Conda for M1 + if: matrix.os == 'macos-14' + uses: s-weigand/setup-conda@v1 + with: + update-conda: true + python-version: '3.10' + conda-channels: anaconda, conda-forge + - name: Setup Conda for Other OS + if: matrix.os != 'macos-14' uses: s-weigand/setup-conda@v1 with: update-conda: true From b1762829784eab55c5279ba58d2f498caebba4af Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:58:53 -0700 Subject: [PATCH 22/23] two exludes --- .../workflows/regression_tests_cpu_binaries.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 4bb40edcad..7b37b0dce1 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -22,24 +22,19 @@ jobs: exclude: - os: macos-latest python-version: 3.8 + - os: macos-14 + python-version: 3.8 + - os: macos-14 + python-version: 3.9 steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Setup Conda for M1 - if: matrix.os == 'macos-14' - uses: s-weigand/setup-conda@v1 - with: - update-conda: true - python-version: '3.10' - conda-channels: anaconda, conda-forge - - name: Setup Conda for Other OS - if: matrix.os != 'macos-14' + - 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 From b2e24bcc028b0da3b2a98a83deb2d7212ecfdeb5 Mon Sep 17 00:00:00 2001 From: udaij12 Date: Mon, 11 Mar 2024 16:59:27 -0700 Subject: [PATCH 23/23] two exludes --- .github/workflows/regression_tests_cpu_binaries.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/regression_tests_cpu_binaries.yml b/.github/workflows/regression_tests_cpu_binaries.yml index 7b37b0dce1..1f161f36d3 100644 --- a/.github/workflows/regression_tests_cpu_binaries.yml +++ b/.github/workflows/regression_tests_cpu_binaries.yml @@ -35,6 +35,7 @@ jobs: with: update-conda: true python-version: ${{ matrix.python-version }} + conda-channels: anaconda, conda-forge - run: conda --version - run: python --version - name: Setup Java 17