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

[doc] moved doc test command to bottom #3075

Merged
merged 1 commit into from
Mar 9, 2023
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
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Meanwhile, you need to ensure the `sidebars.json` is updated such that it contai

### 🧹 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
<!-- doc-test-command: $command -->
Expand Down
4 changes: 3 additions & 1 deletion docs/source/en/features/nvme_offload.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
# NVMe offload

Author: Hongxin Liu
Expand Down Expand Up @@ -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.CPUAdam }}


<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
7 changes: 4 additions & 3 deletions docs/source/en/get_started/installation.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<!-- doc-test-command: echo "installation.md does not need test" -->

# Setup

Requirements:
- PyTorch >= 1.11 (PyTorch 2.x in progress)
- Python >= 3.7
- CUDA >= 11.0

If you encounter any problem about installation, you may want to raise an [issue](https://github.com/hpcaitech/ColossalAI/issues/new/choose) in this repository.


Expand Down Expand Up @@ -47,3 +45,6 @@ If you don't want to install and enable CUDA kernel fusion (compulsory installat
```shell
CUDA_EXT=1 pip install .
```


<!-- doc-test-command: echo "installation.md does not need test" -->
4 changes: 3 additions & 1 deletion docs/source/zh-Hans/features/nvme_offload.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
# NVMe offload

作者: Hongxin Liu
Expand Down Expand Up @@ -247,3 +246,6 @@ NVME 卸载节省了大约 294 MB 内存。注意使用 Gemini 的 `pin_memory`
{{ autodoc:colossalai.nn.optimizer.HybridAdam }}

{{ autodoc:colossalai.nn.optimizer.CPUAdam }}


<!-- doc-test-command: torchrun --standalone --nproc_per_node=1 nvme_offload.py -->
4 changes: 3 additions & 1 deletion docs/source/zh-Hans/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- PyTorch >= 1.11 (PyTorch 2.x 正在适配中)
- Python >= 3.7
- CUDA >= 11.0

如果你遇到安装问题,可以向本项目 [反馈](https://github.com/hpcaitech/ColossalAI/issues/new/choose)。

## 从PyPI上安装
Expand Down Expand Up @@ -44,3 +44,5 @@ pip install .
```shell
NO_CUDA_EXT=1 pip install .
```

<!-- doc-test-command: echo "installation.md does not need test" -->