Update requirements for Intel macOS (#805)

This commit is contained in:
Sebastian Raschka
2025-09-03 12:15:25 -05:00
committed by GitHub
parent 65e67a9681
commit 590d8489d0
2 changed files with 8 additions and 7 deletions

View File

@@ -9,11 +9,13 @@ description = "Implement a ChatGPT-like LLM in PyTorch from scratch, step by ste
readme = "README.md"
requires-python = ">=3.10,<3.13"
dependencies = [
"torch>=2.3.0",
"torch==2.2.2; sys_platform == 'darwin' and platform_machine == 'x86_64'", # Intel macOS
"torch>=2.3.0; sys_platform != 'darwin' or platform_machine != 'x86_64'",
"jupyterlab>=4.0",
"tiktoken>=0.5.1",
"matplotlib>=3.7.1",
"tensorflow>=2.18.0",
"tensorflow==2.16.2; sys_platform == 'darwin' and platform_machine == 'x86_64'", # Intel macOS
"tensorflow>=2.18.0; sys_platform != 'darwin' or platform_machine != 'x86_64'",
"tqdm>=4.66.1",
"numpy>=1.26,<2.1",
"pandas>=2.2.1",
@@ -38,15 +40,12 @@ line-length = 140
[tool.ruff.lint]
exclude = [".venv"]
# Ignored rules (W504 removed)
ignore = [
"C406", "E226", "E402", "E702", "E703",
"E722", "E731", "E741"
]
# `llms_from_scratch` PyPI package
[tool.setuptools]
package-dir = {"" = "pkg"}

View File

@@ -1,8 +1,10 @@
torch >= 2.3.0 # all
torch == 2.2.2; sys_platform == 'darwin' and platform_machine == 'x86_64' # Intel macOS
torch >= 2.3.0; sys_platform != 'darwin' or platform_machine != 'x86_64' # all chapters
jupyterlab >= 4.0 # all
tiktoken >= 0.5.1 # ch02; ch04; ch05
matplotlib >= 3.7.1 # ch04; ch06; ch07
tensorflow >= 2.18.0 # ch05; ch06; ch07
tensorflow == 2.16.2; sys_platform == 'darwin' and platform_machine == 'x86_64' # Intel macOS
tensorflow >= 2.18.0; sys_platform != 'darwin' or platform_machine != 'x86_64' # ch05; ch06; ch07
tqdm >= 4.66.1 # ch05; ch07
numpy >= 1.26, < 2.1 # dependency of several other libraries like torch and pandas
pandas >= 2.2.1 # ch06