simplify and use pythorch 3.12

This commit is contained in:
rasbt
2025-02-19 21:01:15 -06:00
parent 361a75d9e2
commit ca0eee4cf9
10 changed files with 20 additions and 24 deletions

View File

@@ -33,13 +33,13 @@ jobs:
- name: Set up Python (uv) - name: Set up Python (uv)
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.12"
- name: Install uv and dependencies - name: Install uv and dependencies
shell: bash shell: bash
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh 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 pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
uv add pytest-ruff nbval uv add pytest-ruff nbval

View File

@@ -33,14 +33,13 @@ jobs:
- name: Set up Python (uv) - name: Set up Python (uv)
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.12"
- name: Install uv and dependencies - name: Install uv and dependencies
shell: bash shell: bash
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --dev --python 3.11 uv sync --dev --python 3.12
uv python install 3.11
uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
uv add pytest-ruff nbval uv add pytest-ruff nbval

View File

@@ -31,12 +31,12 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.10"
- name: Install dependencies - name: Install dependencies
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11 uv python install 3.10
uv add . --dev uv add . --dev
uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
uv add torch==${{ matrix.pytorch-version }} uv add torch==${{ matrix.pytorch-version }}

View File

@@ -33,7 +33,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.12"
- name: Create Virtual Environment and Install Dependencies - name: Create Virtual Environment and Install Dependencies
run: | run: |

View File

@@ -27,13 +27,13 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.11" python-version: "3.12"
- name: Install dependencies - name: Install dependencies
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11 uv python install 3.12
uv add . --dev uv sync --dev --python 3.12
uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
uv add pytest-ruff nbval uv add pytest-ruff nbval
uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

View File

@@ -29,7 +29,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
@@ -37,7 +37,7 @@ jobs:
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
pip install --upgrade pip pip install --upgrade pip
pip install uv pip install uv
uv venv --python=python3.11 uv venv --python=python3.12
source .venv/Scripts/activate source .venv/Scripts/activate
export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem" export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem"
uv pip install -r requirements.txt uv pip install -r requirements.txt

View File

@@ -29,14 +29,14 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
run: | run: |
curl -fsSL https://astral.sh/uv/install.sh | bash curl -fsSL https://astral.sh/uv/install.sh | bash
export PATH=$HOME/.local/bin:$PATH 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" export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem"
uv sync --dev uv sync --dev
uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt

View File

@@ -18,13 +18,12 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
- name: Install dependencies - name: Install dependencies
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11 uv sync --dev --python 3.12
uv add . --dev
uv add pytest-ruff pytest-check-links uv add pytest-ruff pytest-check-links
# Current version of retry doesn't work well if there are broken non-URL links # Current version of retry doesn't work well if there are broken non-URL links
# pip install pytest pytest-check-links pytest-retry # pip install pytest pytest-check-links pytest-retry

View File

@@ -18,13 +18,12 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
- name: Install codespell - name: Install codespell
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11 uv sync --dev --python 3.12
uv add . --dev
uv add codespell uv add codespell
- name: Run codespell - name: Run codespell

View File

@@ -14,12 +14,11 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.12'
- name: Install ruff (a faster flake 8 equivalent) - name: Install ruff (a faster flake 8 equivalent)
run: | run: |
curl -LsSf https://astral.sh/uv/install.sh | sh curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11 uv sync --dev --python 3.12
uv add . --dev
uv add ruff uv add ruff
- name: Run ruff with exceptions - name: Run ruff with exceptions