2024-05-12 19:03:14 -05:00
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
|
def test_gpt_class_finetune():
|
2024-06-21 05:23:24 -05:00
|
|
|
command = ["python", "ch06/01_main-chapter-code/gpt_class_finetune.py", "--test_mode"]
|
2024-05-12 19:03:14 -05:00
|
|
|
|
|
|
|
result = subprocess.run(command, capture_output=True, text=True)
|
|
|
|
assert result.returncode == 0, f"Script exited with errors: {result.stderr}"
|