Skip to content

Commit ce3b9f6

Browse files
chore(docs): prioritize use of entry points in docs + fix nightly badge (#1692)
* chore(docs): fix typo in nightly badge * chore(docs): prioritize the use of entrypoints for consistency
1 parent c66cd40 commit ce3b9f6

31 files changed

+105
-107
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pytest -sx tests/test_stuff.py::test_something
3030
```
3131

3232
```bash
33-
python -m lerobot.scripts.train --some.option=true
33+
lerobot-train --some.option=true
3434
```
3535

3636
## SECTION TO REMOVE BEFORE SUBMITTING YOUR PR

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test-end-to-end:
4444
${MAKE} DEVICE=$(DEVICE) test-smolvla-ete-eval
4545

4646
test-act-ete-train:
47-
python -m lerobot.scripts.train \
47+
lerobot-train \
4848
--policy.type=act \
4949
--policy.dim_model=64 \
5050
--policy.n_action_steps=20 \
@@ -68,12 +68,12 @@ test-act-ete-train:
6868
--output_dir=tests/outputs/act/
6969

7070
test-act-ete-train-resume:
71-
python -m lerobot.scripts.train \
71+
lerobot-train \
7272
--config_path=tests/outputs/act/checkpoints/000002/pretrained_model/train_config.json \
7373
--resume=true
7474

7575
test-act-ete-eval:
76-
python -m lerobot.scripts.eval \
76+
lerobot-eval \
7777
--policy.path=tests/outputs/act/checkpoints/000004/pretrained_model \
7878
--policy.device=$(DEVICE) \
7979
--env.type=aloha \
@@ -82,7 +82,7 @@ test-act-ete-eval:
8282
--eval.batch_size=1
8383

8484
test-diffusion-ete-train:
85-
python -m lerobot.scripts.train \
85+
lerobot-train \
8686
--policy.type=diffusion \
8787
--policy.down_dims='[64,128,256]' \
8888
--policy.diffusion_step_embed_dim=32 \
@@ -106,7 +106,7 @@ test-diffusion-ete-train:
106106
--output_dir=tests/outputs/diffusion/
107107

108108
test-diffusion-ete-eval:
109-
python -m lerobot.scripts.eval \
109+
lerobot-eval \
110110
--policy.path=tests/outputs/diffusion/checkpoints/000002/pretrained_model \
111111
--policy.device=$(DEVICE) \
112112
--env.type=pusht \
@@ -115,7 +115,7 @@ test-diffusion-ete-eval:
115115
--eval.batch_size=1
116116

117117
test-tdmpc-ete-train:
118-
python -m lerobot.scripts.train \
118+
lerobot-train \
119119
--policy.type=tdmpc \
120120
--policy.device=$(DEVICE) \
121121
--policy.push_to_hub=false \
@@ -137,7 +137,7 @@ test-tdmpc-ete-train:
137137
--output_dir=tests/outputs/tdmpc/
138138

139139
test-tdmpc-ete-eval:
140-
python -m lerobot.scripts.eval \
140+
lerobot-eval \
141141
--policy.path=tests/outputs/tdmpc/checkpoints/000002/pretrained_model \
142142
--policy.device=$(DEVICE) \
143143
--env.type=xarm \
@@ -148,7 +148,7 @@ test-tdmpc-ete-eval:
148148

149149

150150
test-smolvla-ete-train:
151-
python -m lerobot.scripts.train \
151+
lerobot-train \
152152
--policy.type=smolvla \
153153
--policy.n_action_steps=20 \
154154
--policy.chunk_size=20 \
@@ -171,7 +171,7 @@ test-smolvla-ete-train:
171171
--output_dir=tests/outputs/smolvla/
172172

173173
test-smolvla-ete-eval:
174-
python -m lerobot.scripts.eval \
174+
lerobot-eval \
175175
--policy.path=tests/outputs/smolvla/checkpoints/000004/pretrained_model \
176176
--policy.device=$(DEVICE) \
177177
--env.type=aloha \

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<div align="center">
88

9-
[![Tests](https://github.com/huggingface/lerobot/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/huggingface/lerobot/actions/workflows/nighty.yml?query=branch%3Amain)
9+
[![Tests](https://github.com/huggingface/lerobot/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/huggingface/lerobot/actions/workflows/nightly.yml?query=branch%3Amain)
1010
[![Python versions](https://img.shields.io/pypi/pyversions/lerobot)](https://www.python.org/downloads/)
1111
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/huggingface/lerobot/blob/main/LICENSE)
1212
[![Status](https://img.shields.io/pypi/status/lerobot)](https://pypi.org/project/lerobot/)
@@ -276,7 +276,7 @@ Check out [example 2](https://github.com/huggingface/lerobot/blob/main/examples/
276276
We also provide a more capable script to parallelize the evaluation over multiple environments during the same rollout. Here is an example with a pretrained model hosted on [lerobot/diffusion_pusht](https://huggingface.co/lerobot/diffusion_pusht):
277277

278278
```bash
279-
python -m lerobot.scripts.eval \
279+
lerobot-eval \
280280
--policy.path=lerobot/diffusion_pusht \
281281
--env.type=pusht \
282282
--eval.batch_size=10 \
@@ -288,10 +288,10 @@ python -m lerobot.scripts.eval \
288288
Note: After training your own policy, you can re-evaluate the checkpoints with:
289289

290290
```bash
291-
python -m lerobot.scripts.eval --policy.path={OUTPUT_DIR}/checkpoints/last/pretrained_model
291+
lerobot-eval --policy.path={OUTPUT_DIR}/checkpoints/last/pretrained_model
292292
```
293293

294-
See `python -m lerobot.scripts.eval --help` for more instructions.
294+
See `lerobot-eval --help` for more instructions.
295295

296296
### Train your own policy
297297

@@ -303,15 +303,15 @@ A link to the wandb logs for the run will also show up in yellow in your termina
303303

304304
\<img src="https://raw.githubusercontent.com/huggingface/lerobot/main/media/wandb.png" alt="WandB logs example"\>
305305

306-
Note: For efficiency, during training every checkpoint is evaluated on a low number of episodes. You may use `--eval.n_episodes=500` to evaluate on more episodes than the default. Or, after training, you may want to re-evaluate your best checkpoints on more episodes or change the evaluation settings. See `python -m lerobot.scripts.eval --help` for more instructions.
306+
Note: For efficiency, during training every checkpoint is evaluated on a low number of episodes. You may use `--eval.n_episodes=500` to evaluate on more episodes than the default. Or, after training, you may want to re-evaluate your best checkpoints on more episodes or change the evaluation settings. See `lerobot-eval --help` for more instructions.
307307

308308
#### Reproduce state-of-the-art (SOTA)
309309

310310
We provide some pretrained policies on our [hub page](https://huggingface.co/lerobot) that can achieve state-of-the-art performances.
311311
You can reproduce their training by loading the config from their run. Simply running:
312312

313313
```bash
314-
python -m lerobot.scripts.train --config_path=lerobot/diffusion_pusht
314+
lerobot-train --config_path=lerobot/diffusion_pusht
315315
```
316316

317317
reproduces SOTA results for Diffusion Policy on the PushT task.

docs/source/cameras.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To instantiate a camera, you need a camera identifier. This identifier might cha
99
To find the camera indices of the cameras plugged into your system, run the following script:
1010

1111
```bash
12-
python -m lerobot.find_cameras opencv # or realsense for Intel Realsense cameras
12+
lerobot-find-cameras opencv # or realsense for Intel Realsense cameras
1313
```
1414

1515
The output will look something like this if you have two cameras connected:

docs/source/hilserl.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ Example configuration for training the [reward classifier](https://huggingface.c
412412
To train the classifier, use the `train.py` script with your configuration:
413413

414414
```bash
415-
python -m lerobot.scripts.train --config_path path/to/reward_classifier_train_config.json
415+
lerobot-train --config_path path/to/reward_classifier_train_config.json
416416
```
417417

418418
**Deploying and Testing the Model**
@@ -458,7 +458,7 @@ The reward classifier will automatically provide rewards based on the visual inp
458458
3. **Train the classifier**:
459459

460460
```bash
461-
python -m lerobot.scripts.train --config_path src/lerobot/configs/reward_classifier_train_config.json
461+
lerobot-train --config_path src/lerobot/configs/reward_classifier_train_config.json
462462
```
463463

464464
4. **Test the classifier**:

docs/source/hope_jr.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pip install -e ".[hopejr]"
1919
Before starting calibration and operation, you need to identify the USB ports for each HopeJR component. Run this script to find the USB ports for the arm, hand, glove, and exoskeleton:
2020

2121
```bash
22-
python -m lerobot.find_port
22+
lerobot-find-port
2323
```
2424

2525
This will display the available USB ports and their associated devices. Make note of the port paths (e.g., `/dev/tty.usbmodem58760433331`, `/dev/tty.usbmodem11301`) as you'll need to specify them in the `--robot.port` and `--teleop.port` parameters when recording data, replaying episodes, or running teleoperation scripts.
@@ -31,7 +31,7 @@ Before performing teleoperation, HopeJR's limbs need to be calibrated. Calibrati
3131
### 1.1 Calibrate Robot Hand
3232

3333
```bash
34-
python -m lerobot.calibrate \
34+
lerobot-calibrate \
3535
--robot.type=hope_jr_hand \
3636
--robot.port=/dev/tty.usbmodem58760432281 \
3737
--robot.id=blue \
@@ -81,7 +81,7 @@ Once you have set the appropriate boundaries for all joints, click "Save" to sav
8181
### 1.2 Calibrate Teleoperator Glove
8282

8383
```bash
84-
python -m lerobot.calibrate \
84+
lerobot-calibrate \
8585
--teleop.type=homunculus_glove \
8686
--teleop.port=/dev/tty.usbmodem11201 \
8787
--teleop.id=red \
@@ -120,7 +120,7 @@ Once calibration is complete, the system will save the calibration to `/Users/yo
120120
### 1.3 Calibrate Robot Arm
121121

122122
```bash
123-
python -m lerobot.calibrate \
123+
lerobot-calibrate \
124124
--robot.type=hope_jr_arm \
125125
--robot.port=/dev/tty.usbserial-1110 \
126126
--robot.id=white
@@ -146,7 +146,7 @@ Use the calibration interface to set the range boundaries for each joint. Move e
146146
### 1.4 Calibrate Teleoperator Exoskeleton
147147

148148
```bash
149-
python -m lerobot.calibrate \
149+
lerobot-calibrate \
150150
--teleop.type=homunculus_arm \
151151
--teleop.port=/dev/tty.usbmodem11201 \
152152
--teleop.id=black
@@ -178,7 +178,7 @@ Due to global variable conflicts in the Feetech middleware, teleoperation for ar
178178
### Hand
179179

180180
```bash
181-
python -m lerobot.teleoperate \
181+
lerobot-teleoperate \
182182
--robot.type=hope_jr_hand \
183183
--robot.port=/dev/tty.usbmodem58760432281 \
184184
--robot.id=blue \
@@ -194,7 +194,7 @@ python -m lerobot.teleoperate \
194194
### Arm
195195

196196
```bash
197-
python -m lerobot.teleoperate \
197+
lerobot-teleoperate \
198198
--robot.type=hope_jr_arm \
199199
--robot.port=/dev/tty.usbserial-1110 \
200200
--robot.id=white \
@@ -214,7 +214,7 @@ Record, Replay and Train with Hope-JR is still experimental.
214214
This step records the dataset, which can be seen as an example [here](https://huggingface.co/datasets/nepyope/hand_record_test_with_video_data/settings).
215215

216216
```bash
217-
python -m lerobot.record \
217+
lerobot-record \
218218
--robot.type=hope_jr_hand \
219219
--robot.port=/dev/tty.usbmodem58760432281 \
220220
--robot.id=right \
@@ -236,7 +236,7 @@ python -m lerobot.record \
236236
### Replay
237237

238238
```bash
239-
python -m lerobot.replay \
239+
lerobot-replay \
240240
--robot.type=hope_jr_hand \
241241
--robot.port=/dev/tty.usbmodem58760432281 \
242242
--robot.id=right \
@@ -248,7 +248,7 @@ python -m lerobot.replay \
248248
### Train
249249

250250
```bash
251-
python -m lerobot.scripts.train \
251+
lerobot-train \
252252
--dataset.repo_id=nepyope/hand_record_test_with_video_data \
253253
--policy.type=act \
254254
--output_dir=outputs/train/hopejr_hand \
@@ -263,7 +263,7 @@ python -m lerobot.scripts.train \
263263
This training run can be viewed as an example [here](https://wandb.ai/tino/lerobot/runs/rp0k8zvw?nw=nwusertino).
264264

265265
```bash
266-
python -m lerobot.record \
266+
lerobot-record \
267267
--robot.type=hope_jr_hand \
268268
--robot.port=/dev/tty.usbmodem58760432281 \
269269
--robot.id=right \

docs/source/il_robots.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Note that the `id` associated with a robot is used to store the calibration file
4545
<hfoptions id="teleoperate_so101">
4646
<hfoption id="Command">
4747
```bash
48-
python -m lerobot.teleoperate \
48+
lerobot-teleoperate \
4949
--robot.type=so101_follower \
5050
--robot.port=/dev/tty.usbmodem58760431541 \
5151
--robot.id=my_awesome_follower_arm \
@@ -101,7 +101,7 @@ With `rerun`, you can teleoperate again while simultaneously visualizing the cam
101101
<hfoptions id="teleoperate_koch_camera">
102102
<hfoption id="Command">
103103
```bash
104-
python -m lerobot.teleoperate \
104+
lerobot-teleoperate \
105105
--robot.type=koch_follower \
106106
--robot.port=/dev/tty.usbmodem58760431541 \
107107
--robot.id=my_awesome_follower_arm \
@@ -174,7 +174,7 @@ Now you can record a dataset. To record 5 episodes and upload your dataset to th
174174
<hfoptions id="record">
175175
<hfoption id="Command">
176176
```bash
177-
python -m lerobot.record \
177+
lerobot-record \
178178
--robot.type=so101_follower \
179179
--robot.port=/dev/tty.usbmodem585A0076841 \
180180
--robot.id=my_awesome_follower_arm \
@@ -376,7 +376,7 @@ You can replay the first episode on your robot with either the command below or
376376
<hfoptions id="replay">
377377
<hfoption id="Command">
378378
```bash
379-
python -m lerobot.replay \
379+
lerobot-replay \
380380
--robot.type=so101_follower \
381381
--robot.port=/dev/tty.usbmodem58760431541 \
382382
--robot.id=my_awesome_follower_arm \
@@ -428,10 +428,10 @@ Your robot should replicate movements similar to those you recorded. For example
428428

429429
## Train a policy
430430

431-
To train a policy to control your robot, use the [`python -m lerobot.scripts.train`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
431+
To train a policy to control your robot, use the [`lerobot-train`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
432432

433433
```bash
434-
python -m lerobot.scripts.train \
434+
lerobot-train \
435435
--dataset.repo_id=${HF_USER}/so101_test \
436436
--policy.type=act \
437437
--output_dir=outputs/train/act_so101_test \
@@ -453,7 +453,7 @@ Training should take several hours. You will find checkpoints in `outputs/train/
453453
To resume training from a checkpoint, below is an example command to resume from `last` checkpoint of the `act_so101_test` policy:
454454

455455
```bash
456-
python -m lerobot.scripts.train \
456+
lerobot-train \
457457
--config_path=outputs/train/act_so101_test/checkpoints/last/pretrained_model/train_config.json \
458458
--resume=true
459459
```
@@ -490,7 +490,7 @@ You can use the `record` script from [`lerobot/record.py`](https://github.com/hu
490490
<hfoptions id="eval">
491491
<hfoption id="Command">
492492
```bash
493-
python -m lerobot.record \
493+
lerobot-record \
494494
--robot.type=so100_follower \
495495
--robot.port=/dev/ttyACM1 \
496496
--robot.cameras="{ up: {type: opencv, index_or_path: /dev/video10, width: 640, height: 480, fps: 30}, side: {type: intelrealsense, serial_number_or_name: 233522074606, width: 640, height: 480, fps: 30}}" \

docs/source/il_sim.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ If you uploaded your dataset to the hub you can [visualize your dataset online](
9696

9797
## Train a policy
9898

99-
To train a policy to control your robot, use the [`python -m lerobot.scripts.train`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
99+
To train a policy to control your robot, use the [`lerobot-train`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
100100

101101
```bash
102-
python -m lerobot.scripts.train \
102+
lerobot-train \
103103
--dataset.repo_id=${HF_USER}/il_gym \
104104
--policy.type=act \
105105
--output_dir=outputs/train/il_sim_test \

docs/source/koch.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pip install -e ".[dynamixel]"
3131
To find the port for each bus servo adapter, run this script:
3232

3333
```bash
34-
python -m lerobot.find_port
34+
lerobot-find-port
3535
```
3636

3737
<hfoptions id="example">
@@ -98,7 +98,7 @@ For a visual reference on how to set the motor ids please refer to [this video](
9898
<hfoption id="Command">
9999

100100
```bash
101-
python -m lerobot.setup_motors \
101+
lerobot-setup-motors \
102102
--robot.type=koch_follower \
103103
--robot.port=/dev/tty.usbmodem575E0031751 # <- paste here the port found at previous step
104104
```
@@ -174,7 +174,7 @@ Do the same steps for the leader arm but modify the command or script accordingl
174174
<hfoption id="Command">
175175

176176
```bash
177-
python -m lerobot.setup_motors \
177+
lerobot-setup-motors \
178178
--teleop.type=koch_leader \
179179
--teleop.port=/dev/tty.usbmodem575E0031751 \ # <- paste here the port found at previous step
180180
```
@@ -211,7 +211,7 @@ Run the following command or API example to calibrate the follower arm:
211211
<hfoption id="Command">
212212

213213
```bash
214-
python -m lerobot.calibrate \
214+
lerobot-calibrate \
215215
--robot.type=koch_follower \
216216
--robot.port=/dev/tty.usbmodem58760431551 \ # <- The port of your robot
217217
--robot.id=my_awesome_follower_arm # <- Give the robot a unique name
@@ -249,7 +249,7 @@ Do the same steps to calibrate the leader arm, run the following command or API
249249
<hfoption id="Command">
250250

251251
```bash
252-
python -m lerobot.calibrate \
252+
lerobot-calibrate \
253253
--teleop.type=koch_leader \
254254
--teleop.port=/dev/tty.usbmodem58760431551 \ # <- The port of your robot
255255
--teleop.id=my_awesome_leader_arm # <- Give the robot a unique name

0 commit comments

Comments
 (0)