Add additional notes on debugging SSL issues (#810)

* Add SSL instructions

* update old pytorch tests

* update

* update

* update

* update

* update

* update

* update

* update
This commit is contained in:
Sebastian Raschka
2025-09-06 11:46:50 -05:00
committed by GitHub
parent 290fa10d55
commit 18c6b970ab
4 changed files with 49 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
name: Test PyTorch 2.2 and 2.6
name: Test PyTorch 2.3 and 2.5
on:
push:
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
pytorch-version: [ 2.3.0, 2.6.0 ]
pytorch-version: [ 2.3.0, 2.5.0 ]
steps:
- uses: actions/checkout@v4

View File

@@ -179,7 +179,36 @@
"id": "56488f2c-a2b8-49f1-aaeb-461faad08dce",
"metadata": {},
"source": [
"- (If you encounter an `ssl.SSLCertVerificationError` when executing the previous code cell, it might be due to using an outdated Python version; you can find [more information here on GitHub](https://github.com/rasbt/LLMs-from-scratch/pull/403))"
"<br>\n",
"\n",
"---\n",
"\n",
"<br>\n",
"\n",
"#### Troubleshooting SSL certificate errors\n",
"\n",
"- Some readers reported seeing ssl.SSLCertVerificationError: `SSL: CERTIFICATE_VERIFY_FAILED` when running `urllib.request.urlretrieve` in VSCode or Jupyter. \n",
"- This usually means Python's certificate bundle is outdated.\n",
"\n",
"\n",
"**Fixes**\n",
"\n",
"- Use Python ≥ 3.9; you can check your Python version by executing the following code:\n",
"```python\n",
"import sys\n",
"print(sys.__version__)\n",
"```\n",
"- Upgrade the cert bundle:\n",
" - pip: `pip install --upgrade certifi`\n",
" - uv: `uv pip install --upgrade certifi`\n",
"- Restart the Jupyter kernel after upgrading.\n",
"- If you still encounter an `ssl.SSLCertVerificationError` when executing the previous code cell, please see the discussion at [more information here on GitHub](https://github.com/rasbt/LLMs-from-scratch/pull/403)\n",
"\n",
"<br>\n",
"\n",
"---\n",
"\n",
"<br>"
]
},
{

View File

@@ -9,18 +9,22 @@ 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.2.2,<2.6; 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.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",
"pip>=25.0.1",
"pytest>=8.3.5",
"torch>=2.2.2,<2.6; sys_platform == 'darwin' and platform_machine == 'x86_64' and python_version < '3.13'",
"torch>=2.2.2; sys_platform == 'darwin' and platform_machine == 'arm64'",
"torch>=2.2.2; sys_platform == 'linux'",
"torch>=2.2.2; sys_platform == 'win32'",
"tensorflow>=2.16.2; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"tensorflow>=2.18.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
"tensorflow>=2.18.0; sys_platform == 'linux'",
"tensorflow>=2.18.0; sys_platform == 'win32'",
"jupyterlab>=4.0",
"tiktoken>=0.5.1",
"matplotlib>=3.7.1",
"tqdm>=4.66.1",
"numpy>=1.26,<2.1",
"pandas>=2.2.1",
"pip>=25.0.1",
"pytest>=8.3.5",
]
[tool.uv.sources]

View File

@@ -1,5 +1,5 @@
torch>=2.2.2,<2.6; sys_platform == 'darwin' and platform_machine == 'x86_64' # Intel macOS
torch >= 2.3.0; sys_platform != 'darwin' or platform_machine != 'x86_64' # all chapters
torch >= 2.2.2; 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