diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 56d0e7f..a9a9fb4 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -1,4 +1,4 @@ -name: Check Markdown Links +name: Check hyperlinks on: push: @@ -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 ./ \ No newline at end of file diff --git a/ch02/01_main-chapter-code/ch02.ipynb b/ch02/01_main-chapter-code/ch02.ipynb index a57af93..b639fa8 100644 --- a/ch02/01_main-chapter-code/ch02.ipynb +++ b/ch02/01_main-chapter-code/ch02.ipynb @@ -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)**" ] }, { @@ -1874,7 +1874,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.6" + "version": "3.10.10" } }, "nbformat": 4, diff --git a/ch05/01_main-chapter-code/ch05.ipynb b/ch05/01_main-chapter-code/ch05.ipynb index 9ab053a..349c534 100644 --- a/ch05/01_main-chapter-code/ch05.ipynb +++ b/ch05/01_main-chapter-code/ch05.ipynb @@ -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", "" ] @@ -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" ] }, @@ -2438,7 +2438,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.2" + "version": "3.10.10" } }, "nbformat": 4,