mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
add HF equivalency tests for standalone nbs (#774)
* add HF equivalency tests for standalone nbs * update * update * update * update
This commit is contained in:
committed by
GitHub
parent
a6b883c9f9
commit
80d4732456
6
.github/workflows/basic-tests-linux-uv.yml
vendored
6
.github/workflows/basic-tests-linux-uv.yml
vendored
@@ -51,8 +51,10 @@ jobs:
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch04/03_kv-cache/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch05/12_gemma3/tests/test_gemma3.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/test_llama32_nb.py
|
||||
pytest --ruff ch05/11_qwen3/tests/test_qwen3_nb.py
|
||||
pytest --ruff ch05/12_gemma3/tests/test_gemma3_nb.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks (uv)
|
||||
|
||||
6
.github/workflows/basic-tests-macos-uv.yml
vendored
6
.github/workflows/basic-tests-macos-uv.yml
vendored
@@ -50,8 +50,10 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch05/12_gemma3/tests/test_gemma3.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/test_llama32_nb.py
|
||||
pytest --ruff ch05/11_qwen3/tests/test_qwen3_nb.py
|
||||
pytest --ruff ch05/12_gemma3/tests/test_gemma3_nb.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks (uv)
|
||||
|
||||
@@ -47,7 +47,6 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
|
||||
2
.github/workflows/basic-tests-pip.yml
vendored
2
.github/workflows/basic-tests-pip.yml
vendored
@@ -41,7 +41,6 @@ jobs:
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
|
||||
pip install pytest pytest-ruff nbval
|
||||
|
||||
- name: Test Selected Python Scripts
|
||||
@@ -50,7 +49,6 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
|
||||
1
.github/workflows/basic-tests-pixi.yml
vendored
1
.github/workflows/basic-tests-pixi.yml
vendored
@@ -50,7 +50,6 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
|
||||
2
.github/workflows/basic-tests-pytorch-rc.yml
vendored
2
.github/workflows/basic-tests-pytorch-rc.yml
vendored
@@ -33,7 +33,6 @@ jobs:
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
uv sync --dev --python=3.10 # tests for backwards compatibility
|
||||
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
|
||||
|
||||
@@ -43,7 +42,6 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
|
||||
@@ -43,6 +43,7 @@ jobs:
|
||||
pip install tensorflow-io-gcs-filesystem==0.31.0 # Explicit for Windows
|
||||
pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
|
||||
pip install pytest-ruff nbval
|
||||
pip install -e .
|
||||
|
||||
- name: Run Python Tests
|
||||
shell: bash
|
||||
@@ -51,7 +52,9 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/test_llama32_nb.py
|
||||
pytest --ruff ch05/11_qwen3/tests/test_qwen3_nb.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Run Jupyter Notebook Tests
|
||||
|
||||
@@ -51,7 +51,6 @@ jobs:
|
||||
pytest --ruff setup/02_installing-python-libraries/tests.py
|
||||
pytest --ruff ch04/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/01_main-chapter-code/tests.py
|
||||
pytest --ruff ch05/07_gpt_to_llama/tests/tests.py
|
||||
pytest --ruff ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Run Jupyter Notebook Tests
|
||||
|
||||
Reference in New Issue
Block a user