Skip to content

Commit 7c59f37

Browse files
zihugithubzihugithub
andauthored
[Docs] Update README to use FlagScale CLI commands (flagos-ai#1130)
### PR Category Others ### PR Types Doc ### PR Description docs: update README examples to FlagScale CLI Update all command examples in README from manual script calls to official FlagScale CLI commands for consistency. --------- Co-authored-by: zihugithub <fbye@baai.ac.cn>
1 parent e1e6cee commit 7c59f37

12 files changed

Lines changed: 99 additions & 45 deletions

File tree

docs/getting-started.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ Require Megatron-LM-FL env
129129

130130
3. Start the distributed training job:
131131
```sh
132-
python run.py --config-path ./examples/qwen3/conf --config-name train action=run
132+
flagscale train qwen3 --config ./examples/qwen3/conf/train.yaml
133+
# or
134+
flagscale train qwen3 -c ./examples/qwen3/conf/train.yaml
133135
```
134136

135137
4. Stop the distributed training job:
136138
```sh
137-
python run.py --config-path ./examples/qwen3/conf --config-name train action=stop
139+
flagscale train qwen3 --stop
138140
```
139141

140142

@@ -169,7 +171,9 @@ Require vLLM-FL env
169171

170172
3. Start inference:
171173
```sh
172-
python run.py --config-path ./examples/qwen3/conf --config-name inference_fl action=run
174+
flagscale inference qwen3 --config ./examples/qwen3/conf/inference_fl.yaml
175+
# or
176+
flagscale inference qwen3 -c ./examples/qwen3/conf/inference_fl.yaml
173177
```
174178

175179
### Serve
@@ -214,12 +218,14 @@ Require vLLM-FL env
214218

215219
3. Start the server:
216220
```sh
217-
python run.py --config-path ./examples/qwen3/conf --config-name serve action=run
221+
flagscale serve qwen3 --config ./examples/qwen3/conf/serve.yaml
222+
# or
223+
flagscale serve qwen3 -c ./examples/qwen3/conf/serve.yaml
218224
```
219225

220226
4. Stop the server:
221227
```sh
222-
python run.py --config-path ./examples/qwen3/conf --config-name serve action=stop
228+
flagscale serve qwen3 --stop
223229
```
224230

225231
### RL
@@ -272,13 +278,15 @@ Require verl-FL env
272278

273279
4. Start rl:
274280
```sh
275-
python run.py --config-path ./examples/qwen3/conf --config-name rl action=run
281+
flagscale rl qwen3 --config ./examples/qwen3/conf/rl.yaml
282+
# or
283+
flagscale rl qwen3 -c ./examples/qwen3/conf/rl.yaml
276284
```
277285
You can check the output in your experiment directory.
278286

279287
5. Stop rl:
280288
```sh
281-
python run.py --config-path ./examples/qwen3/conf --config-name rl action=stop
289+
flagscale rl qwen3 --stop
282290
```
283291
or force to stop ray cluster.
284292
```sh

examples/emu3.5/conf/README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,15 @@ generate:
7777
entrypoint: `./flagscale/inference/inference_emu3p5.py`
7878

7979
```bash
80-
python run.py --config-path examples/emu3.5/conf/ --config-name image_generation.yaml
80+
flagscale inference emu3.5 --config ./examples/emu3.5/conf/image_generation.yaml
81+
# or
82+
flagscale inference emu3.5 -c ./examples/emu3.5/conf/image_generation.yaml
8183
```
8284

8385
```bash
84-
python run.py --config-path examples/emu3.5/conf/ --config-name interleaved_generation.yaml
86+
flagscale inference emu3.5 --config ./examples/emu3.5/conf/interleaved_generation.yaml
87+
# or
88+
flagscale inference emu3.5 -c ./examples/emu3.5/conf/interleaved_generation.yaml
8589
```
8690

8791
## Online Serve
@@ -104,7 +108,9 @@ Note: You can also directly run command `python emu3p5.py`, with setting the en
104108

105109
```bash
106110
# Start emu3.5 serve
107-
python run.py --config-path examples/emu3.5/conf/ --config-name serve_emu3p5 action=run
111+
flagscale serve emu3.5 --config ./examples/emu3.5/conf/serve_emu3p5.yaml
112+
# or
113+
flagscale serve emu3.5 -c ./examples/emu3.5/conf/serve_emu3p5.yaml
108114
```
109115

110116
```bash
@@ -114,7 +120,9 @@ python client.py
114120

115121
```bash
116122
# Stop emu3.5 serve
117-
python run.py --config-path examples/emu3.5/conf/ --config-name serve_emu3p5 action=stop
123+
flagscale serve emu3.5 --config ./examples/emu3.5/conf/serve_emu3p5.yaml --stop
124+
# or
125+
flagscale serve emu3.5 -c ./examples/emu3.5/conf/serve_emu3p5.yaml --stop
118126
```
119127

120128
```python

examples/pi0/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ Configure the following fields:
181181
### Start Training
182182
```sh
183183
cd FlagScale/
184-
python run.py --config-path ./examples/pi0/conf --config-name train action=run
184+
flagscale train pi0 --config ./examples/pi0/conf/train.yaml
185+
# or
186+
flagscale train pi0 -c ./examples/pi0/conf/train.yaml
185187
```
186188

187189
Training logs are saved to `outputs/pi0_train/logs/host_0_localhost.output` by default.
@@ -191,7 +193,7 @@ Checkpoints are saved to `${experiment.exp_dir}/checkpoints` (default: `outputs/
191193
### Stop Training
192194
```sh
193195
cd FlagScale/
194-
python run.py --config-path ./examples/pi0/conf --config-name train action=stop
196+
flagscale train pi0 --stop
195197
```
196198

197199
## Inference
@@ -270,10 +272,9 @@ Configure the following fields:
270272

271273
```sh
272274
cd FlagScale/
273-
python run.py \
274-
--config-path ./examples/pi0/conf \
275-
--config-name inference \
276-
action=run
275+
flagscale inference pi0 --config ./examples/pi0/conf/inference.yaml
276+
# or
277+
flagscale inference pi0 -c ./examples/pi0/conf/inference.yaml
277278
```
278279

279280
Inference logs are saved to `outputs/pi0_inference/inference_logs/host_0_localhost.output` by default.
@@ -312,7 +313,9 @@ Configure the following fields:
312313

313314
```sh
314315
cd FlagScale/
315-
python run.py --config-path ./examples/pi0/conf --config-name serve action=run
316+
flagscale serve pi0 --config ./examples/pi0/conf/serve.yaml
317+
# or
318+
flagscale serve pi0 -c ./examples/pi0/conf/serve.yaml
316319
```
317320

318321
Serving logs are saved to `outputs/pi0_serve/logs/host_0_localhost.output` by default.
@@ -321,7 +324,7 @@ Serving logs are saved to `outputs/pi0_serve/logs/host_0_localhost.output` by de
321324

322325
```sh
323326
cd FlagScale/
324-
python run.py --config-path ./examples/pi0/conf --config-name serve action=stop
327+
flagscale serve pi0 --stop
325328
```
326329

327330
### Test Server with Client

examples/pi0_5/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ Configure the following fields:
188188
### Start Training
189189
```sh
190190
cd FlagScale/
191-
python run.py --config-path ./examples/pi0_5/conf --config-name train action=run
191+
flagscale train pi0_5 --config ./examples/pi0_5/conf/train.yaml
192+
# or
193+
flagscale train pi0_5 -c ./examples/pi0_5/conf/train.yaml
192194
```
193195

194196
Training logs are saved to `outputs/pi0_5_train/logs/host_0_localhost.output` by default.
@@ -198,7 +200,7 @@ Checkpoints are saved to `${experiment.exp_dir}/checkpoints` (default: `outputs/
198200
### Stop Training
199201
```sh
200202
cd FlagScale/
201-
python run.py --config-path ./examples/pi0_5/conf --config-name train action=stop
203+
flagscale train pi0_5 --stop
202204
```
203205

204206
## Inference
@@ -279,10 +281,9 @@ Configure the following fields:
279281

280282
```sh
281283
cd FlagScale/
282-
python run.py \
283-
--config-path ./examples/pi0_5/conf \
284-
--config-name inference \
285-
action=run
284+
flagscale inference pi0_5 --config ./examples/pi0_5/conf/inference.yaml
285+
# or
286+
flagscale inference pi0_5 -c ./examples/pi0_5/conf/inference.yaml
286287
```
287288

288289
Inference logs are saved to `outputs/pi0_5_inference/inference_logs/host_0_localhost.output` by default.
@@ -323,7 +324,9 @@ Configure the following fields:
323324

324325
```sh
325326
cd FlagScale/
326-
python run.py --config-path ./examples/pi0_5/conf --config-name serve action=run
327+
flagscale serve pi0_5 --config ./examples/pi0_5/conf/serve.yaml
328+
# or
329+
flagscale serve pi0_5 -c ./examples/pi0_5/conf/serve.yaml
327330
```
328331

329332
Serving logs are saved to `outputs/pi0_5_serve/logs/host_0_localhost.output` by default.
@@ -332,7 +335,7 @@ Serving logs are saved to `outputs/pi0_5_serve/logs/host_0_localhost.output` by
332335

333336
```sh
334337
cd FlagScale/
335-
python run.py --config-path ./examples/pi0_5/conf --config-name serve action=stop
338+
flagscale serve pi0_5 --stop
336339
```
337340

338341
### Test Server with Client

examples/qwen2_5_vl/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ tokenizer_path: /mnt/qwen2.5-vl-ckpts/Qwen2.5-VL-7B-Instruct-tp2
155155

156156
Start training.
157157
```bash
158-
python run.py --config-path ./examples/qwen2_5_vl/conf --config-name train action=run
158+
flagscale train qwen2_5_vl --config ./examples/qwen2_5_vl/conf/train.yaml
159+
# or
160+
flagscale train qwen2_5_vl -c ./examples/qwen2_5_vl/conf/train.yaml
159161
```
160162

161163
Stop training.
162164
```bash
163-
python run.py --config-path ./examples/qwen2_5_vl/conf --config-name train action=stop
165+
flagscale train qwen2_5_vl --stop
164166
```
165167

166168
### Convert the checkpoint to HuggingFace
@@ -186,7 +188,9 @@ More details about [Auto-Evaluation](https://github.com/flageval-baai/Auto-Evalu
186188
### Start the server
187189

188190
```sh
189-
python run.py --config-path ./examples/robobrain2/conf --config-name serve action=run
191+
flagscale serve robobrain2 --config ./examples/robobrain2/conf/serve.yaml
192+
# or
193+
flagscale serve robobrain2 -c ./examples/robobrain2/conf/serve.yaml
190194
```
191195

192196
### Start evaluation

examples/qwen3/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ Start server with FlagScale:
9898

9999
```sh
100100
cd FlagScale
101-
python run.py --config-path ./examples/qwen3/conf --config-name serve action=run
101+
flagscale serve qwen3 --config ./examples/qwen3/conf/serve.yaml
102+
# or
103+
flagscale serve qwen3 -c ./examples/qwen3/conf/serve.yaml
102104
```
103105

104106
Check logs:

examples/qwen3_vl/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ tokenizer_path: /mnt/qwen-vl-ckpts/Qwen3-VL-8B-Instruct
142142

143143
Start training.
144144
```bash
145-
python run.py --config-path ./examples/qwen3_vl/conf --config-name train action=run
145+
flagscale train qwen3_vl --config ./examples/qwen3_vl/conf/train.yaml
146+
# or
147+
flagscale train qwen3_vl -c ./examples/qwen3_vl/conf/train.yaml
146148
```
147149

148150
Stop training.
149151
```bash
150-
python run.py --config-path ./examples/qwen3_vl/conf --config-name train action=stop
152+
flagscale train qwen3_vl --stop
151153
```
152154

153155
### 5. Convert the checkpoint to HuggingFace
@@ -177,7 +179,9 @@ More details about [Auto-Evaluation](https://github.com/flageval-baai/Auto-Evalu
177179
More details refer to this [doc](https://github.com/flagos-ai/FlagScale/tree/main/examples/robobrain2_5).
178180

179181
```sh
180-
python run.py --config-path ./examples/robobrain2_5/conf --config-name serve action=run
182+
flagscale serve robobrain2_5 --config ./examples/robobrain2_5/conf/serve.yaml
183+
# or
184+
flagscale serve robobrain2_5 -c ./examples/robobrain2_5/conf/serve.yaml
181185
```
182186

183187
### 2. Start evaluation

examples/robobrain2/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ Change 2 fields:
7070
### Run Inference
7171

7272
```sh
73-
python run.py --config-path ./examples/robobrain2/conf --config-name inference action=run
73+
flagscale inference robobrain2 --config ./examples/robobrain2/conf/inference.yaml
74+
# or
75+
flagscale inference robobrain2 -c ./examples/robobrain2/conf/inference.yaml
7476
```
7577

7678
### Check Logs
@@ -97,7 +99,9 @@ Change 1 fields:
9799

98100
```sh
99101
cd FlagScale/
100-
python run.py --config-path ./examples/robobrain2/conf --config-name serve action=run
102+
flagscale serve robobrain2 --config ./examples/robobrain2/conf/serve.yaml
103+
# or
104+
flagscale serve robobrain2 -c ./examples/robobrain2/conf/serve.yaml
101105
```
102106

103107
## Test Server with CURL

examples/robobrain2_5/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ Change 2 fields:
7171
### Run Inference
7272

7373
```sh
74-
python run.py --config-path ./examples/robobrain2_5/conf --config-name inference action=run
74+
flagscale inference robobrain2_5 --config ./examples/robobrain2_5/conf/inference.yaml
75+
# or
76+
flagscale inference robobrain2_5 -c ./examples/robobrain2_5/conf/inference.yaml
7577
```
7678

7779
### Check Logs
@@ -98,7 +100,9 @@ Change 1 fields:
98100

99101
```sh
100102
cd FlagScale/
101-
python run.py --config-path ./examples/robobrain2_5/conf --config-name serve action=run
103+
flagscale serve robobrain2_5 --config ./examples/robobrain2_5/conf/serve.yaml
104+
# or
105+
flagscale serve robobrain2_5 -c ./examples/robobrain2_5/conf/serve.yaml
102106
```
103107

104108
## Test Server with CURL

examples/robobrain_x0/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ Change 2 fields:
119119
### Start Training
120120
```sh
121121
cd FlagScale/
122-
python run.py --config-path ./examples/robobrain_x0/conf/ --config-name train action=run
122+
flagscale train robobrain_x0 --config ./examples/robobrain_x0/conf/train.yaml
123+
# or
124+
flagscale train robobrain_x0 -c ./examples/robobrain_x0/conf/train.yaml
123125
```
124126

125127
## Training with Lerobot Dataset
@@ -217,7 +219,9 @@ defaults:
217219

218220
```sh
219221
cd FlagScale/
220-
python run.py --config-path ./examples/robobrain_x0/conf/ --config-name train action=run
222+
flagscale train robobrain_x0 --config ./examples/robobrain_x0/conf/train.yaml
223+
# or
224+
flagscale train robobrain_x0 -c ./examples/robobrain_x0/conf/train.yaml
221225
```
222226

223227
### Supported Video Backends
@@ -255,7 +259,9 @@ Change 3 fields:
255259

256260
```sh
257261
cd FlagScale/
258-
python run.py --config-path ./examples/robobrain_x0/conf --config-name serve action=run
262+
flagscale serve robobrain_x0 --config ./examples/robobrain_x0/conf/serve.yaml
263+
# or
264+
flagscale serve robobrain_x0 -c ./examples/robobrain_x0/conf/serve.yaml
259265
```
260266

261267
### Test Server with Client

0 commit comments

Comments
 (0)