mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
simplify and use pythorch 3.12
This commit is contained in:
4
.github/workflows/basic-tests-linux-uv.yml
vendored
4
.github/workflows/basic-tests-linux-uv.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
5
.github/workflows/basic-tests-macos-uv.yml
vendored
5
.github/workflows/basic-tests-macos-uv.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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 }}
|
||||||
|
|||||||
2
.github/workflows/basic-tests-pip.yml
vendored
2
.github/workflows/basic-tests-pip.yml
vendored
@@ -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: |
|
||||||
|
|||||||
6
.github/workflows/basic-tests-pytorch-rc.yml
vendored
6
.github/workflows/basic-tests-pytorch-rc.yml
vendored
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
4
.github/workflows/basic-tests-windows-uv.yml
vendored
4
.github/workflows/basic-tests-windows-uv.yml
vendored
@@ -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
|
||||||
|
|||||||
5
.github/workflows/check-links.yml
vendored
5
.github/workflows/check-links.yml
vendored
@@ -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
|
||||||
|
|||||||
5
.github/workflows/check-spelling-errors.yml
vendored
5
.github/workflows/check-spelling-errors.yml
vendored
@@ -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
|
||||||
|
|||||||
5
.github/workflows/pep8-linter.yml
vendored
5
.github/workflows/pep8-linter.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user