mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-05-12 02:56:19 +08:00
refactor: restructure project and update documentation for second edition (#500)
* feat: remove bilingual button on the front page * misc: clean repo * test: fix test suite for v1/v2 restructure and removed language switch * refactor: restructure chapters for the second edition * refactor: restructure project * refactor: remove unused scripts * refactor: move conftest.py to tests directory * refactor: update README with new chapter structure and logo path * fix: update image paths in README and README_EN for consistency * refactor: update directory structure and script references in documentation
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
# Summary
|
||||
|
||||
[Machine Learning Systems: Design and Implementation, 2nd Edition](index.md)
|
||||
[前言](00_chapter_preface/index.md)
|
||||
|
||||
# Basic
|
||||
|
||||
- [Chapter 1: Introduction](01_chapter_introduction/index.md)
|
||||
- [Chapter 2: Programming Interfaces and Computational Graphs](02_chapter_programming_and_graph/index.md)
|
||||
- [Chapter 3: AI Accelerators and Programming](03_chapter_accelerator/index.md)
|
||||
|
||||
# System
|
||||
|
||||
- [Chapter 4: AI Compilers and Runtime Systems](04_chapter_compiler_and_runtime/index.md)
|
||||
- [Chapter 5: Data Processing Systems](05_chapter_data_processing/index.md)
|
||||
- [Chapter 6: Training Systems](06_chapter_training_systems/index.md)
|
||||
|
||||
# Applications and More
|
||||
|
||||
- [Chapter 7: Model Serving](07_chapter_model_serving/index.md)
|
||||
- [Chapter 8: RL Systems](08_chapter_rl_systems/index.md)
|
||||
- [Chapter 9: Large-scale GPU Cluster Management](09_chapter_gpu_cluster/index.md)
|
||||
|
||||
1
v2/en_chapters/img
Symbolic link
1
v2/en_chapters/img
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/img
|
||||
@@ -3,3 +3,24 @@
|
||||
This book provides a comprehensive introduction to the design and implementation of modern machine learning systems. It covers the full technology stack, from programming interfaces and AI accelerators to distributed training, model serving, and large-scale GPU cluster management.
|
||||
|
||||
The 2nd edition has been significantly restructured and expanded to reflect the rapid evolution of the ML systems landscape, including new chapters on AI compilers, RL systems, and GPU cluster management.
|
||||
|
||||
```toc
|
||||
:maxdepth: 2
|
||||
|
||||
[前言](00_chapter_preface/index)
|
||||
|
||||
# Basic
|
||||
01_chapter_introduction/index
|
||||
02_chapter_programming_and_graph/index
|
||||
03_chapter_accelerator/index
|
||||
|
||||
# System
|
||||
04_chapter_compiler_and_runtime/index
|
||||
05_chapter_data_processing/index
|
||||
06_chapter_training_systems/index
|
||||
|
||||
# Applications and More
|
||||
07_chapter_model_serving/index
|
||||
08_chapter_rl_systems/index
|
||||
09_chapter_gpu_cluster/index
|
||||
```
|
||||
|
||||
1
v2/en_chapters/mlsys.bib
Symbolic link
1
v2/en_chapters/mlsys.bib
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/mlsys.bib
|
||||
1
v2/en_chapters/references
Symbolic link
1
v2/en_chapters/references
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/references
|
||||
1
v2/en_chapters/static
Symbolic link
1
v2/en_chapters/static
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/static
|
||||
@@ -10,12 +10,14 @@
|
||||
openmlsys/
|
||||
├── v2/ # Version 2 (active version, accepting contributions)
|
||||
│ ├── zh_chapters/ # Chinese chapter source files
|
||||
│ │ ├── chapter_xxx/ # Per-chapter directory, containing index.md and section .md files
|
||||
│ │ ├── 00_chapter_preface/ # Per-chapter directory (numeric prefix + name)
|
||||
│ │ ├── 01_chapter_introduction/
|
||||
│ │ ├── ...
|
||||
│ │ ├── index.md # Book homepage
|
||||
│ │ └── SUMMARY.md # Auto-generated by script — do not edit manually
|
||||
│ ├── en_chapters/ # English chapter source files (same structure as zh_chapters)
|
||||
│ ├── books/zh/ # Chinese mdBook configuration (used for build)
|
||||
│ ├── docs/ # Documentation (location of this file)
|
||||
│ ├── info/ # Documentation (location of this file)
|
||||
│ └── book.toml # English mdBook configuration
|
||||
├── v1/ # Version 1 (archived)
|
||||
├── img/ # Shared image assets for the entire book
|
||||
@@ -39,7 +41,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
# 2. Install mdBook
|
||||
cargo install mdbook
|
||||
|
||||
# 3. Clone the repository
|
||||
# 3. Clone the repository (Python 3 must also be installed)
|
||||
git clone https://github.com/openmlsys/openmlsys.git
|
||||
cd openmlsys
|
||||
```
|
||||
@@ -54,7 +56,7 @@ cd openmlsys
|
||||
bash build_mdbook_v2.sh
|
||||
```
|
||||
|
||||
Build output is placed in `.mdbook-v2/book/cn/` (Chinese) and `.mdbook-v2/book/` (English).
|
||||
Build output is placed in `.mdbook-v2-zh/book` (Chinese) and `.mdbook-v2/book` (English).
|
||||
|
||||
### Live Preview
|
||||
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
openmlsys/
|
||||
├── v2/ # 第二版(当前活跃版本,接受贡献)
|
||||
│ ├── zh_chapters/ # 中文章节源文件
|
||||
│ │ ├── chapter_xxx/ # 各章目录,包含 index.md 及各节 .md 文件
|
||||
│ │ ├── 00_chapter_preface/ # 各章目录(数字前缀 + 名称)
|
||||
│ │ ├── 01_chapter_introduction/
|
||||
│ │ ├── ...
|
||||
│ │ ├── index.md # 全书首页
|
||||
│ │ └── SUMMARY.md # 由脚本自动生成,勿手动编辑
|
||||
│ ├── en_chapters/ # 英文章节源文件(结构与中文章节一致)
|
||||
│ ├── books/zh/ # 中文 mdBook 配置(供构建使用)
|
||||
│ ├── docs/ # 文档(本文件所在位置)
|
||||
│ ├── info/ # 文档(本文件所在位置)
|
||||
│ └── book.toml # 英文版 mdBook 配置
|
||||
├── v1/ # 第一版(已归档)
|
||||
├── img/ # 全书共享图片资源
|
||||
@@ -39,7 +41,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
# 2. 安装 mdBook
|
||||
cargo install mdbook
|
||||
|
||||
# 3. 克隆仓库
|
||||
# 3. 克隆仓库(需预先安装 Python 3)
|
||||
git clone https://github.com/openmlsys/openmlsys.git
|
||||
cd openmlsys
|
||||
```
|
||||
@@ -54,7 +56,7 @@ cd openmlsys
|
||||
bash build_mdbook_v2.sh
|
||||
```
|
||||
|
||||
构建产物输出至 `.mdbook-v2/book/cn/`(中文)和 `.mdbook-v2/book/`(英文)。
|
||||
构建产物输出至 `.mdbook-v2-zh/book`(中文)和 `.mdbook-v2/book`(英文)。
|
||||
|
||||
### 实时预览
|
||||
|
||||
|
||||
BIN
v2/info/Pic-Instruction/Pic_Templates_and_Samples.pptx
Normal file
BIN
v2/info/Pic-Instruction/Pic_Templates_and_Samples.pptx
Normal file
Binary file not shown.
15
v2/info/Pic-Instruction/Requirements and Instructions.md
Normal file
15
v2/info/Pic-Instruction/Requirements and Instructions.md
Normal file
@@ -0,0 +1,15 @@
|
||||
## 书籍图片制作模板
|
||||
为了保证图书中图片尽量统一,我们输出了图形的基础模板,包括色系、线条、箭头、框图等流程图常用的模块。
|
||||
大家可以根据自己绘制流程图的需求,选择合适的组件进行绘制。为了方便大家作图,我们以PPT的形式提供给大家,不需要开发者掌握单独的作图工具。
|
||||
使用的简单流程如下:
|
||||
1、梳理流程图的逻辑。
|
||||
2、使用PPT中的模板进行绘制。
|
||||
3、通过PPT导出图片,建议为png格式。
|
||||
4、将导出后的图片放到相应img目录相应的章节,在文档中进行引用。
|
||||
|
||||
字体说明:
|
||||
1、正文采用五号字体(中文为宋体,英文为 Time New Roman)。
|
||||
2、插图/插表的标题用小五号黑体,插图/插表的其他文字用小五号字体(中文为宋体,英文为 Time New Roman)。
|
||||
3、代码采用小五号, Courier New字体。
|
||||
|
||||
|
||||
31
v2/info/info.md
Normal file
31
v2/info/info.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## 环境安装
|
||||
机器学习系统书籍部署在GitHub是依赖于mdbook工具实现的。我们推荐使用rust的原生包管理器cargo安装mdbook。
|
||||
```bash
|
||||
# 安装rust工具链,获取cargo
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
cargo install mdbook
|
||||
```
|
||||
|
||||
## 编译HTML版本
|
||||
在编译前先下载[openmlsys-zh](https://github.com/openmlsys/openmlsys-zh) , 所有的编译命令都在这个文件目录内执行。
|
||||
```bash
|
||||
git clone https://github.com/openmlsys/openmlsys-zh.git
|
||||
cd openmlsys-zh
|
||||
```
|
||||
使用mdbook工具编译HTML。 请尽量使用build_mdbook_v2.sh脚本进行编译,保证首页正确合并到书籍中去。
|
||||
```bash
|
||||
sh build_mdbook_v1.sh
|
||||
sh build_mdbook_v2.sh
|
||||
```
|
||||
|
||||
生成的html会在`.mdbook-v2/book`或者`.mdbook-v2-zh/book`下。此时我们可以使用`tools/assemble_docs_publish_tree.py`组装最终的双语发布版本,然后将其拷贝至openmlsys.github.io的docs发布。
|
||||
|
||||
具体工作流可以参考`.github/workflows/update_docs.yml`
|
||||
|
||||
## 样式规范
|
||||
|
||||
贡献请遵照本教程的[样式规范](style.md)。
|
||||
|
||||
## 中英文术语对照
|
||||
|
||||
翻译请参照[中英文术语对照](terminology.md)。
|
||||
12
v2/info/issue.md
Normal file
12
v2/info/issue.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Issue的label
|
||||
目前我们的issue主要有如下label:
|
||||
|
||||
- great suggestion: 表示该issue是用户为本书的内容提供的写作建议,并且该建议是一个很好的建立
|
||||
- discussion: 表示该issue是用户针对文章内容进行特定讨论,或用户对内容进行了建议并且该建议还处在商讨中
|
||||
- to be confirmed: 表示该issue被assign给了章节作者,但是目前章节作者并没有回复处理这个issue
|
||||
- confirmed: 表示该issue被章节作者已经确认
|
||||
- fixed: 表示该issue相关的pr被approve/merge
|
||||
|
||||
常规而言,一个针对书籍内容校正的issue的状态变换应该为:
|
||||
|
||||
to be confirmed ----> confirmed ----> fixed
|
||||
30
v2/info/refenence_guide.md
Normal file
30
v2/info/refenence_guide.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 参考文献引用方式
|
||||
|
||||
所有参考文献统一维护在 `mlsys.bib` 中。
|
||||
|
||||
## 添加文献条目
|
||||
|
||||
在 `mlsys.bib` 中添加 BibTeX 格式的条目,添加前请先检索是否已存在同名 key:
|
||||
|
||||
```bibtex
|
||||
@inproceedings{cnn2015,
|
||||
title = {CNN},
|
||||
author = {xxx},
|
||||
year = {2015},
|
||||
keywords = {xxx}
|
||||
}
|
||||
```
|
||||
|
||||
## 正文引用
|
||||
|
||||
引用时前面需要有一个空格:
|
||||
|
||||
1. 单篇参考文献
|
||||
```
|
||||
这篇文章参考了论文 :cite:`cnn2015`
|
||||
```
|
||||
|
||||
2. 多篇参考文献用逗号分隔
|
||||
```
|
||||
这篇文章参考了论文 :cite:`cnn2015,rnn2015`
|
||||
```
|
||||
@@ -19,7 +19,7 @@ This document defines the formatting and style requirements for v2 chapter conte
|
||||
|
||||
## File Structure
|
||||
|
||||
- Each chapter corresponds to a `v2/en_chapters/chapter_<name>/` directory
|
||||
- Each chapter corresponds to a `v2/en_chapters/<nn>_chapter_<name>/` directory (e.g., `02_chapter_programming_and_graph/`)
|
||||
- The chapter entry file is `index.md`; section content goes in separate `.md` files in the same directory
|
||||
- Declare the section structure in `index.md` using a `toc` block (used to auto-generate `SUMMARY.md`):
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
## 文件结构
|
||||
|
||||
- 每章对应 `v2/zh_chapters/chapter_<名称>/` 目录
|
||||
- 每章对应 `v2/zh_chapters/<nn>_chapter_<名称>/` 目录(如 `02_chapter_programming_and_graph/`)
|
||||
- 章节入口为 `index.md`,各节内容放在同目录下的独立 `.md` 文件中
|
||||
- 在 `index.md` 中使用 `toc` 块声明本章的节结构(脚本据此自动生成 `SUMMARY.md`):
|
||||
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
# Summary
|
||||
|
||||
[机器学习系统:设计和实现(第二版)](index.md)
|
||||
[前言](00_chapter_preface/index.md)
|
||||
|
||||
# 基础篇
|
||||
|
||||
- [第1章 导论](01_chapter_introduction/index.md)
|
||||
- [第2章 编程接口与计算图](02_chapter_programming_and_graph/index.md)
|
||||
- [第3章 AI加速器与编程](03_chapter_accelerator/index.md)
|
||||
|
||||
# 系统篇
|
||||
|
||||
- [第4章 AI编译器与运行时系统](04_chapter_compiler_and_runtime/index.md)
|
||||
- [第5章 数据处理系统](05_chapter_data_processing/index.md)
|
||||
- [第6章 训练系统](06_chapter_training_systems/index.md)
|
||||
|
||||
# 应用与扩展篇
|
||||
|
||||
- [第7章 模型服务](07_chapter_model_serving/index.md)
|
||||
- [第8章 强化学习系统](08_chapter_rl_systems/index.md)
|
||||
- [第9章 大规模GPU集群管理](09_chapter_gpu_cluster/index.md)
|
||||
|
||||
1
v2/zh_chapters/img
Symbolic link
1
v2/zh_chapters/img
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/img
|
||||
@@ -1,3 +1,24 @@
|
||||
# 机器学习系统:设计和实现(第二版)
|
||||
|
||||
本书系统性地介绍机器学习系统的设计原理与实现方法,涵盖从编程接口、AI加速器、编译器到分布式训练、模型服务和大规模集群管理等核心主题。第二版在第一版基础上进行了全面更新和重构,反映了机器学习系统领域的最新进展。
|
||||
|
||||
```toc
|
||||
:maxdepth: 2
|
||||
|
||||
[前言](00_chapter_preface/index)
|
||||
|
||||
# 基础篇
|
||||
01_chapter_introduction/index
|
||||
02_chapter_programming_and_graph/index
|
||||
03_chapter_accelerator/index
|
||||
|
||||
# 系统篇
|
||||
04_chapter_compiler_and_runtime/index
|
||||
05_chapter_data_processing/index
|
||||
06_chapter_training_systems/index
|
||||
|
||||
# 应用与扩展篇
|
||||
07_chapter_model_serving/index
|
||||
08_chapter_rl_systems/index
|
||||
09_chapter_gpu_cluster/index
|
||||
```
|
||||
|
||||
1
v2/zh_chapters/mlsys.bib
Symbolic link
1
v2/zh_chapters/mlsys.bib
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/mlsys.bib
|
||||
1
v2/zh_chapters/references
Symbolic link
1
v2/zh_chapters/references
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/references
|
||||
1
v2/zh_chapters/static
Symbolic link
1
v2/zh_chapters/static
Symbolic link
@@ -0,0 +1 @@
|
||||
../../v1/static
|
||||
Reference in New Issue
Block a user