mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-08-29 11:00:55 +00:00
fix tests
This commit is contained in:
parent
37c33d6fee
commit
c8bcdf5206
2
.github/workflows/basic-tests-linux.yml
vendored
2
.github/workflows/basic-tests-linux.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
||||
pytest setup/02_installing-python-libraries/tests.py
|
||||
pytest ch04/01_main-chapter-code/tests.py
|
||||
pytest ch05/01_main-chapter-code/tests.py
|
||||
pytest ch06/01_main-chapter-code/gpt-class-finetune.py --test_mode
|
||||
pytest ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
run: |
|
||||
|
2
.github/workflows/basic-tests-macos.yml
vendored
2
.github/workflows/basic-tests-macos.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
||||
pytest setup/02_installing-python-libraries/tests.py
|
||||
pytest ch04/01_main-chapter-code/tests.py
|
||||
pytest ch05/01_main-chapter-code/tests.py
|
||||
pytest ch06/01_main-chapter-code/gpt-class-finetune.py --test_mode
|
||||
pytest ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
run: |
|
||||
|
2
.github/workflows/basic-tests-windows.yml
vendored
2
.github/workflows/basic-tests-windows.yml
vendored
@ -44,7 +44,7 @@ jobs:
|
||||
pytest setup/02_installing-python-libraries/tests.py
|
||||
pytest ch04/01_main-chapter-code/tests.py
|
||||
pytest ch05/01_main-chapter-code/tests.py
|
||||
pytest ch06/01_main-chapter-code/gpt-class-finetune.py --test_mode
|
||||
pytest ch06/01_main-chapter-code/tests.py
|
||||
|
||||
- name: Validate Selected Jupyter Notebooks
|
||||
shell: bash
|
||||
|
18
ch06/01_main-chapter-code/tests.py
Normal file
18
ch06/01_main-chapter-code/tests.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) Sebastian Raschka under Apache License 2.0 (see LICENSE.txt).
|
||||
# Source for "Build a Large Language Model From Scratch"
|
||||
# - https://www.manning.com/books/build-a-large-language-model-from-scratch
|
||||
# Code: https://github.com/rasbt/LLMs-from-scratch
|
||||
|
||||
# File for internal use (unit tests)
|
||||
|
||||
|
||||
import subprocess
|
||||
import pytest
|
||||
|
||||
|
||||
def test_gpt_class_finetune():
|
||||
command = ["python", "ch06/01_main-chapter-code/gpt-class-finetune.py", "--test_mode"]
|
||||
|
||||
result = subprocess.run(command, capture_output=True, text=True)
|
||||
assert result.returncode == 0, f"Script exited with errors: {result.stderr}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user