Skip to content

Commit e63669e

Browse files
Add sphinx doc builder (#77)
1 parent f24a8ac commit e63669e

30 files changed

+367
-246
lines changed

.dev_scripts/build_docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pip install -r requirements/docs.txt
2+
cd docs
3+
rm -rf build
4+
5+
# update api rst
6+
#rm -rf source/api/
7+
#sphinx-apidoc --module-first -o source/api/ ../modelscope/
8+
make html

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Key features:
3131
2. Tuners provided by SWIFT can be combined together to allow exploration of multiple tuners on a model for best result.
3232
3. Support calling `activate_adapter` or `deactivate_adapter` or `set_active_adapters` to activate/deactivate tuners. User can inference with one model and multiple tuners in different threads independently.
3333

34-
Users can check the [documentation of SWIFT](./docs/Get Started/1.Introduction.md) to get detail tutorials.
34+
Users can check the [documentation of Swift](docs/source/GetStarted/Introduction.md) to get detail tutorials.
3535

3636
## LLM SFT Example
3737
[code link](https://github.com/modelscope/swift/tree/main/examples/pytorch/llm)

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SWIFT(Scalable lightWeight Infrastructure for Fine-Tuning)是一个可扩展
2929
2. 在单次训练或推理中可以使用多个tuners
3030
3. 支持调用`activate_adapter``deactivate_adapter``set_active_adapters`来使部分tuner激活或失活,用户可以在推理时同时加载多个独立的tuners在不同线程中并行使用。
3131

32-
用户可以查看 [Swift官方文档](./docs/Get Started/1.Introduction.md) 来了解详细信息。
32+
用户可以查看 [Swift官方文档](docs/source/GetStarted/Introduction.md) 来了解详细信息。
3333

3434
## 大模型微调的例子
3535
[code link](https://github.com/modelscope/swift/tree/main/examples/pytorch/llm)

docs/Get Started/4.examples.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/Modules/1.swift.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/Modules/2.lora.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/Modules/3.Restuning.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

docs/Modules/4.adapter.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/Modules/5.side.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)