From d70b77dd37672da23140953b9ea77f90948c2ba6 Mon Sep 17 00:00:00 2001 From: Lola-jo <120191238+Lola-jo@users.noreply.github.com> Date: Sun, 17 Sep 2023 13:55:00 +0800 Subject: [PATCH 1/7] Update CONTRIBUTING.md Add the solution of presence of a non-consecutive heading level --- open-machine-learning-jupyter-book/CONTRIBUTING.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index 95b2932152..5ba2f0f0d9 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -290,4 +290,15 @@ jupyter notebook > **Warning** > -> Please make sure the Jupyter Notebook is running in trusted mode, and the [init_cell](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/init_cell/README.html) is configured for the first cell of slide notebook. So that the first cell will be automatically executed to load the CSS. \ No newline at end of file +> Please make sure the Jupyter Notebook is running in trusted mode, and the [init_cell](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/init_cell/README.html) is configured for the first cell of slide notebook. So that the first cell will be automatically executed to load the CSS. +> +> Q&A +> WARNING: Non-consecutive header level increase; 0 to 2 [myst.header] (https://static-1300131294.cos.ap-shanghai.myqcloud.com/images/header-level-increase.png) +> This error is caused by the presence of a non-consecutive heading level increase in the specified Jupyter notebook file. Specifically, the heading level increases directly from 0 to 2 without going through level 1. + +To resolve this issue, you can follow these steps: +1. Open the specified Jupyter notebook file. +2. Check the setting for the heading level, which in this lesson is the number of '#'. +3. Ensure that the heading level increases continuously without skipping any levels. +4. If you find a non-continuous heading level increase, adjust it to a continuous level increase. +5. Save the file and re-run the code to ensure the error has been resolved. From 97e58ece4b79167550572121f51c062b5744a1f6 Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 14:21:18 +0800 Subject: [PATCH 2/7] add _toc --- .../CONTRIBUTING.md | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index 5ba2f0f0d9..1ee5cea0f7 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -292,13 +292,33 @@ jupyter notebook > > Please make sure the Jupyter Notebook is running in trusted mode, and the [init_cell](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/init_cell/README.html) is configured for the first cell of slide notebook. So that the first cell will be automatically executed to load the CSS. > -> Q&A -> WARNING: Non-consecutive header level increase; 0 to 2 [myst.header] (https://static-1300131294.cos.ap-shanghai.myqcloud.com/images/header-level-increase.png) -> This error is caused by the presence of a non-consecutive heading level increase in the specified Jupyter notebook file. Specifically, the heading level increases directly from 0 to 2 without going through level 1. +## Q&A + +**Regarding the deletion and addition of the _toc file:** + +```bash + * The _toc file is located in the open-machine-learning-jupyter-book [directory](https://github.com/ocademy-ai/machine-learning/blob/main/open-machine-learning-jupyter-book/_toc.yml) + * In Jupyter Book, the _toc.yml file is the file used to define the directory structure of the book, containing the book chapters, sub-chapters and page hierarchy. + * When you build your book using Jupyter Book, it reads the _toc.yml file and generates a navigation bar based on the directory structure in it. + * To speed up the local book build, you can keep only the content of the chapters you changed for the build. This speeds up the build and ignores errors reported by other chapters. + * However, when deleting other chapters, pay attention to ensure the integrity of the entire book structure, otherwise it may lead to error reporting, it is recommended that when you first get started, one by one CAPTION deletion. +``` + +**Non-consecutive header level increase** + +You may see below failures when building the books: + +```bash + WARNING: Non-consecutive header level increase; 0 to 2 [myst.header] +``` + +This error is caused by the presence of a non-consecutive heading level increase in the specified Jupyter notebook file. Specifically, the heading level increases directly from 0 to 2 without going through level 1. To resolve this issue, you can follow these steps: +```bash 1. Open the specified Jupyter notebook file. 2. Check the setting for the heading level, which in this lesson is the number of '#'. 3. Ensure that the heading level increases continuously without skipping any levels. 4. If you find a non-continuous heading level increase, adjust it to a continuous level increase. 5. Save the file and re-run the code to ensure the error has been resolved. +``` \ No newline at end of file From 4f4491eeb2fc8ae29d1db0110a0eb2603054dc2f Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 14:22:39 +0800 Subject: [PATCH 3/7] add _toc intro --- open-machine-learning-jupyter-book/CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index 1ee5cea0f7..e1c1e1d0f6 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -303,6 +303,7 @@ jupyter notebook * When you build your book using Jupyter Book, it reads the _toc.yml file and generates a navigation bar based on the directory structure in it. * To speed up the local book build, you can keep only the content of the chapters you changed for the build. This speeds up the build and ignores errors reported by other chapters. * However, when deleting other chapters, pay attention to ensure the integrity of the entire book structure, otherwise it may lead to error reporting, it is recommended that when you first get started, one by one CAPTION deletion. + * After the preview, please restore the original _toc structure ``` **Non-consecutive header level increase** From 28b1ad3036d028990722f086bb6d7650e2087e04 Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 14:33:40 +0800 Subject: [PATCH 4/7] check the spelling problems --- open-machine-learning-jupyter-book/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index e1c1e1d0f6..b4c5fc27ff 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -295,7 +295,7 @@ jupyter notebook ## Q&A -**Regarding the deletion and addition of the _toc file:** +**Regarding the deletion and addition of the ‘_toc.yml’ file:** ```bash * The _toc file is located in the open-machine-learning-jupyter-book [directory](https://github.com/ocademy-ai/machine-learning/blob/main/open-machine-learning-jupyter-book/_toc.yml) From 36d73688ffb6909951e1c22b1a38213f17dd10d4 Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 14:36:40 +0800 Subject: [PATCH 5/7] resolve the problem of style_guide --- open-machine-learning-jupyter-book/STYLE_GUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-machine-learning-jupyter-book/STYLE_GUIDE.md b/open-machine-learning-jupyter-book/STYLE_GUIDE.md index 664f9d8844..880de9d6a0 100644 --- a/open-machine-learning-jupyter-book/STYLE_GUIDE.md +++ b/open-machine-learning-jupyter-book/STYLE_GUIDE.md @@ -220,7 +220,7 @@ Note that we may need to set the `width` to `105%` so that all content of `index 4\. Embed HTML within the corresponding section. HTML embedding method refer to Python. For example: -```text +```python from IPython.display import HTML display(HTML("""

From 50ce898fd77c853a73a123f345a2cd20e78db415 Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 15:03:16 +0800 Subject: [PATCH 6/7] change the header name --- open-machine-learning-jupyter-book/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index b4c5fc27ff..8d63fc355f 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -293,7 +293,7 @@ jupyter notebook > Please make sure the Jupyter Notebook is running in trusted mode, and the [init_cell](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/init_cell/README.html) is configured for the first cell of slide notebook. So that the first cell will be automatically executed to load the CSS. > -## Q&A +## FAQ **Regarding the deletion and addition of the ‘_toc.yml’ file:** From 0baeb34ba6206b1b01a99f01c1aeb9d664b97e75 Mon Sep 17 00:00:00 2001 From: lola-jo Date: Sun, 17 Sep 2023 15:28:40 +0800 Subject: [PATCH 7/7] repush --- open-machine-learning-jupyter-book/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-machine-learning-jupyter-book/CONTRIBUTING.md b/open-machine-learning-jupyter-book/CONTRIBUTING.md index 8d63fc355f..18105cc44c 100644 --- a/open-machine-learning-jupyter-book/CONTRIBUTING.md +++ b/open-machine-learning-jupyter-book/CONTRIBUTING.md @@ -295,7 +295,7 @@ jupyter notebook ## FAQ -**Regarding the deletion and addition of the ‘_toc.yml’ file:** +**Regarding the deletion and addition of the _toc.yml file:** ```bash * The _toc file is located in the open-machine-learning-jupyter-book [directory](https://github.com/ocademy-ai/machine-learning/blob/main/open-machine-learning-jupyter-book/_toc.yml)