From ca0eee4cf94a74fb69de59af3a74d367e9d1dc2e Mon Sep 17 00:00:00 2001 From: rasbt Date: Wed, 19 Feb 2025 21:01:15 -0600 Subject: [PATCH] simplify and use pythorch 3.12 --- .github/workflows/basic-tests-linux-uv.yml | 4 ++-- .github/workflows/basic-tests-macos-uv.yml | 5 ++--- .github/workflows/basic-tests-old-pytorch.yml | 4 ++-- .github/workflows/basic-tests-pip.yml | 2 +- .github/workflows/basic-tests-pytorch-rc.yml | 6 +++--- .github/workflows/basic-tests-windows-uv-pip.yml | 4 ++-- .github/workflows/basic-tests-windows-uv.yml | 4 ++-- .github/workflows/check-links.yml | 5 ++--- .github/workflows/check-spelling-errors.yml | 5 ++--- .github/workflows/pep8-linter.yml | 5 ++--- 10 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/basic-tests-linux-uv.yml b/.github/workflows/basic-tests-linux-uv.yml index bef697b..6196f14 100644 --- a/.github/workflows/basic-tests-linux-uv.yml +++ b/.github/workflows/basic-tests-linux-uv.yml @@ -33,13 +33,13 @@ jobs: - name: Set up Python (uv) uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install uv and dependencies shell: bash run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv sync --dev --python 3.11 + uv sync --dev --python 3.12 uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv add pytest-ruff nbval diff --git a/.github/workflows/basic-tests-macos-uv.yml b/.github/workflows/basic-tests-macos-uv.yml index 3dec430..e6c694e 100644 --- a/.github/workflows/basic-tests-macos-uv.yml +++ b/.github/workflows/basic-tests-macos-uv.yml @@ -33,14 +33,13 @@ jobs: - name: Set up Python (uv) uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install uv and dependencies shell: bash run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv sync --dev --python 3.11 - uv python install 3.11 + uv sync --dev --python 3.12 uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv add pytest-ruff nbval diff --git a/.github/workflows/basic-tests-old-pytorch.yml b/.github/workflows/basic-tests-old-pytorch.yml index 116db3c..210d297 100644 --- a/.github/workflows/basic-tests-old-pytorch.yml +++ b/.github/workflows/basic-tests-old-pytorch.yml @@ -31,12 +31,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.10" - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv python install 3.11 + uv python install 3.10 uv add . --dev uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv add torch==${{ matrix.pytorch-version }} diff --git a/.github/workflows/basic-tests-pip.yml b/.github/workflows/basic-tests-pip.yml index 504690f..6196944 100644 --- a/.github/workflows/basic-tests-pip.yml +++ b/.github/workflows/basic-tests-pip.yml @@ -33,7 +33,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Create Virtual Environment and Install Dependencies run: | diff --git a/.github/workflows/basic-tests-pytorch-rc.yml b/.github/workflows/basic-tests-pytorch-rc.yml index 742bb23..0d5cef6 100644 --- a/.github/workflows/basic-tests-pytorch-rc.yml +++ b/.github/workflows/basic-tests-pytorch-rc.yml @@ -27,13 +27,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv python install 3.11 - uv add . --dev + uv python install 3.12 + uv sync --dev --python 3.12 uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv add pytest-ruff nbval uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu diff --git a/.github/workflows/basic-tests-windows-uv-pip.yml b/.github/workflows/basic-tests-windows-uv-pip.yml index a698440..fa2c5b3 100644 --- a/.github/workflows/basic-tests-windows-uv-pip.yml +++ b/.github/workflows/basic-tests-windows-uv-pip.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies shell: bash @@ -37,7 +37,7 @@ jobs: export PATH="$HOME/.local/bin:$PATH" pip install --upgrade pip pip install uv - uv venv --python=python3.11 + uv venv --python=python3.12 source .venv/Scripts/activate export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem" uv pip install -r requirements.txt diff --git a/.github/workflows/basic-tests-windows-uv.yml b/.github/workflows/basic-tests-windows-uv.yml index 7218685..283c8c1 100644 --- a/.github/workflows/basic-tests-windows-uv.yml +++ b/.github/workflows/basic-tests-windows-uv.yml @@ -29,14 +29,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies shell: bash run: | curl -fsSL https://astral.sh/uv/install.sh | bash export PATH=$HOME/.local/bin:$PATH - uv python install 3.11 + uv python install 3.12 export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem" uv sync --dev uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 52e41d6..79bcd5a 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -18,13 +18,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv python install 3.11 - uv add . --dev + uv sync --dev --python 3.12 uv add pytest-ruff pytest-check-links # Current version of retry doesn't work well if there are broken non-URL links # pip install pytest pytest-check-links pytest-retry diff --git a/.github/workflows/check-spelling-errors.yml b/.github/workflows/check-spelling-errors.yml index d347a2e..d256cc7 100644 --- a/.github/workflows/check-spelling-errors.yml +++ b/.github/workflows/check-spelling-errors.yml @@ -18,13 +18,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install codespell run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv python install 3.11 - uv add . --dev + uv sync --dev --python 3.12 uv add codespell - name: Run codespell diff --git a/.github/workflows/pep8-linter.yml b/.github/workflows/pep8-linter.yml index aa9de7f..87e8b9b 100644 --- a/.github/workflows/pep8-linter.yml +++ b/.github/workflows/pep8-linter.yml @@ -14,12 +14,11 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install ruff (a faster flake 8 equivalent) run: | curl -LsSf https://astral.sh/uv/install.sh | sh - uv python install 3.11 - uv add . --dev + uv sync --dev --python 3.12 uv add ruff - name: Run ruff with exceptions