Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated link checking #117

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Markdown Links
name: Check hyperlinks

on:
push:
Expand All @@ -9,27 +9,22 @@ on:
- main

jobs:
check-links:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Markdown Link Checker
run: npm install -g markdown-link-check
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Create config for markdown link checker
run: |
echo '{
"projectBaseUrl":"${{ github.workspace }}",
"ignorePatterns": [
{
"pattern": "^#"
}
]
}' > $GITHUB_WORKSPACE/md_checker_config.json
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-check-links

- name: Find Markdown Files and Check Links
run: |
find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -c $GITHUB_WORKSPACE/md_checker_config.json
- name: Check links
run: |
pytest --check-links ./
4 changes: 2 additions & 2 deletions ch02/01_main-chapter-code/ch02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,7 @@
"id": "08218d9f-aa1a-4afb-a105-72ff96a54e73",
"metadata": {},
"source": [
"- **You may be interested in the bonus content comparing embedding layers with regular linear layers: [../02_bonus_efficient-multihead-attention](../02_bonus_efficient-multihead-attention)**"
"- **You may be interested in the bonus content comparing embedding layers with regular linear layers: [../03_bonus_embedding-vs-matmul](../03_bonus_embedding-vs-matmul)**"
]
},
{
Expand Down Expand Up @@ -1874,7 +1874,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions ch05/01_main-chapter-code/ch05.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@
"metadata": {},
"source": [
"- In this section, we finally implement the code for training the LLM\n",
"- We focus on a simple training function (if you are interested in augmenting this training function with more advanced techniques, such as learning rate warmup, cosine annealing, and gradient clipping, please refer to [Appendix D](../../appendix-D/03_main-chapter-code))\n",
"- We focus on a simple training function (if you are interested in augmenting this training function with more advanced techniques, such as learning rate warmup, cosine annealing, and gradient clipping, please refer to [Appendix D](../../appendix-D/01_main-chapter-code))\n",
"\n",
"<img src=\"https://sebastianraschka.com/images/LLMs-from-scratch-images/ch05_compressed/train-steps.webp\" width=300px>"
]
Expand Down Expand Up @@ -2028,7 +2028,7 @@
"metadata": {},
"source": [
"- Previously, we only trained a small GPT-2 model using a very small short-story book for educational purposes\n",
"- Interested readers can also find a longer pretraining run on the complete Project Gutenberg book corpus in [../03_bonus_pretraining_on_gutenberg](03_bonus_pretraining_on_gutenberg)\n",
"- Interested readers can also find a longer pretraining run on the complete Project Gutenberg book corpus in [../03_bonus_pretraining_on_gutenberg](../03_bonus_pretraining_on_gutenberg)\n",
"- Fortunately, we don't have to spend tens to hundreds of thousands of dollars to pretrain the model on a large pretraining corpus but can load the pretrained weights provided by OpenAI"
]
},
Expand Down Expand Up @@ -2438,7 +2438,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down