Unverified Commit 416a50db authored by Frank Lee's avatar Frank Lee Committed by GitHub
Browse files

[doc] moved doc test command to bottom (#3075)

parent 91ccf975
...@@ -72,7 +72,7 @@ Meanwhile, you need to ensure the `sidebars.json` is updated such that it contai ...@@ -72,7 +72,7 @@ Meanwhile, you need to ensure the `sidebars.json` is updated such that it contai
### 🧹 Doc Testing ### 🧹 Doc Testing
Every documentation is tested to ensure it works well. You need to add the following line to the top of your file and replace `$command` with the actual command. Do note that the markdown will be converted into a Python file. Assuming you have a `demo.md` file, the test file generated will be `demo.py`. Therefore, you should use `demo.py` in your command, e.g. `python demo.py`. Every documentation is tested to ensure it works well. You need to add the following line to the **bottom of your file** and replace `$command` with the actual command. Do note that the markdown will be converted into a Python file. Assuming you have a `demo.md` file, the test file generated will be `demo.py`. Therefore, you should use `demo.py` in your command, e.g. `python demo.py`.
```markdown ```markdown
<!-- doc-test-command: $command --> <!-- doc-test-command: $command -->
......
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
# NVMe offload # NVMe offload
Author: Hongxin Liu Author: Hongxin Liu
...@@ -259,3 +258,6 @@ NVME offload saves about 294 MB memory. Note that enabling `pin_memory` of Gemin ...@@ -259,3 +258,6 @@ NVME offload saves about 294 MB memory. Note that enabling `pin_memory` of Gemin
{{ autodoc:colossalai.nn.optimizer.HybridAdam }} {{ autodoc:colossalai.nn.optimizer.HybridAdam }}
{{ autodoc:colossalai.nn.optimizer.CPUAdam }} {{ autodoc:colossalai.nn.optimizer.CPUAdam }}
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
<!-- doc-test-command: echo "installation.md does not need test" -->
# Setup # Setup
Requirements: Requirements:
...@@ -47,3 +45,6 @@ If you don't want to install and enable CUDA kernel fusion (compulsory installat ...@@ -47,3 +45,6 @@ If you don't want to install and enable CUDA kernel fusion (compulsory installat
```shell ```shell
CUDA_EXT=1 pip install . CUDA_EXT=1 pip install .
``` ```
<!-- doc-test-command: echo "installation.md does not need test" -->
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
# NVMe offload # NVMe offload
作者: Hongxin Liu 作者: Hongxin Liu
...@@ -247,3 +246,6 @@ NVME 卸载节省了大约 294 MB 内存。注意使用 Gemini 的 `pin_memory` ...@@ -247,3 +246,6 @@ NVME 卸载节省了大约 294 MB 内存。注意使用 Gemini 的 `pin_memory`
{{ autodoc:colossalai.nn.optimizer.HybridAdam }} {{ autodoc:colossalai.nn.optimizer.HybridAdam }}
{{ autodoc:colossalai.nn.optimizer.CPUAdam }} {{ autodoc:colossalai.nn.optimizer.CPUAdam }}
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
...@@ -44,3 +44,5 @@ pip install . ...@@ -44,3 +44,5 @@ pip install .
```shell ```shell
NO_CUDA_EXT=1 pip install . NO_CUDA_EXT=1 pip install .
``` ```
<!-- doc-test-command: echo "installation.md does not need test" -->
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment