diff --git a/.github/workflows/quality-check.yaml b/.github/workflows/quality-check.yaml index 14e465597..396543eea 100644 --- a/.github/workflows/quality-check.yaml +++ b/.github/workflows/quality-check.yaml @@ -4,6 +4,11 @@ on: branches: [ main , 'release/*' ] pull_request: branches: [ main, 'release/*' ] + +env: + UV_SYSTEM_PYTHON: 1 + UV_TORCH_BACKEND: "auto" + jobs: quality-check: runs-on: ubuntu-22.04 @@ -12,7 +17,9 @@ jobs: with: python-version: '3.10' - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 - name: "⚙️ Install dependencies" - run: pip3 install .[dev] + run: uv pip install .[dev] - name: "🧹 Running quality checks" run: make quality diff --git a/.github/workflows/test-check-transformers.yaml b/.github/workflows/test-check-transformers.yaml index 45c745bf4..368a85a1d 100644 --- a/.github/workflows/test-check-transformers.yaml +++ b/.github/workflows/test-check-transformers.yaml @@ -15,6 +15,8 @@ on: env: CADENCE: "commit" HF_TOKEN: ${{ secrets.HF_TOKEN_READ }} + UV_SYSTEM_PYTHON: 1 + UV_TORCH_BACKEND: "auto" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -65,8 +67,10 @@ jobs: with: fetch-depth: 0 fetch-tags: true + - name: Install uv + uses: astral-sh/setup-uv@v6 - name: "⚙️ Install dependencies" - run: pip3 install -U pip setuptools && pip3 install .[dev] + run: uv pip install .[dev] - uses: actions/checkout@v4 with: repository: "neuralmagic/compressed-tensors" @@ -76,10 +80,10 @@ jobs: - name: "⚙️ Install compressed-tensors dependencies" id: install run: | - pip3 uninstall -y compressed-tensors + uv pip uninstall compressed-tensors export GIT_CEILING_DIRECTORIES="$(pwd)" cd compressed-tensors - BUILD_TYPE=nightly pip3 install . + BUILD_TYPE=nightly uv pip install . - name: "Clean compressed-tensors directory" run: rm -r compressed-tensors/ - name: "⚙️ Prepare code coverage" diff --git a/.github/workflows/test-check.yaml b/.github/workflows/test-check.yaml index aa0f534ef..7e12aba89 100644 --- a/.github/workflows/test-check.yaml +++ b/.github/workflows/test-check.yaml @@ -13,6 +13,8 @@ on: env: CADENCE: "commit" + UV_SYSTEM_PYTHON: 1 + UV_TORCH_BACKEND: "auto" jobs: @@ -28,8 +30,10 @@ jobs: with: fetch-depth: 0 fetch-tags: true + - name: Install uv + uses: astral-sh/setup-uv@v6 - name: "⚙️ Install dependencies" - run: pip3 install -U pip setuptools && pip3 install .[dev] + run: uv pip install .[dev] - uses: actions/checkout@v4 with: repository: "neuralmagic/compressed-tensors" @@ -38,10 +42,10 @@ jobs: fetch-tags: true - name: "⚙️ Install compressed-tensors dependencies" run: | - pip3 uninstall -y compressed-tensors + uv pip uninstall compressed-tensors export GIT_CEILING_DIRECTORIES="$(pwd)" cd compressed-tensors - BUILD_TYPE=nightly pip3 install . + BUILD_TYPE=nightly uv pip install . - name: "Clean compressed-tensors directory" run: rm -r compressed-tensors/ - name: "⚙️ Prepare code coverage" @@ -77,8 +81,10 @@ jobs: with: fetch-depth: 0 fetch-tags: true + - name: Install uv + uses: astral-sh/setup-uv@v6 - name: "⚙️ Install dependencies" - run: pip3 install -U pip setuptools && pip3 install .[dev] + run: uv pip install .[dev] - uses: actions/checkout@v4 with: repository: "neuralmagic/compressed-tensors" @@ -87,10 +93,10 @@ jobs: fetch-tags: true - name: "⚙️ Install compressed-tensors dependencies" run: | - pip3 uninstall -y compressed-tensors + uv pip uninstall compressed-tensors export GIT_CEILING_DIRECTORIES="$(pwd)" cd compressed-tensors - BUILD_TYPE=nightly pip3 install . + BUILD_TYPE=nightly uv pip install . - name: "Clean compressed-tensors directory" run: rm -r compressed-tensors/ - name: "⚙️ Prepare code coverage" @@ -131,11 +137,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.12' - + - name: Install uv + uses: astral-sh/setup-uv@v6 - name: "Install dependencies" run: | - pip3 install -U pip setuptools - pip3 install coverage setuptools-scm + uv pip install -U setuptools + uv pip install coverage setuptools-scm make build # need to build to generate the version.py file - name: "Combine and report coverage"