Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
63f7144
fix: sharing predicted chunk with user
fracapuano Apr 23, 2025
9020109
[pre-commit.ci] pre-commit autoupdate (#1011)
pre-commit-ci[bot] Apr 23, 2025
da8bec0
Revert "[pre-commit.ci] pre-commit autoupdate" (#1025)
aliberts Apr 24, 2025
309deca
fix(ci): Pin draccus (<0.10.0) and torch (<2.7) to fix pipeline (#1022)
AdilZouitine Apr 24, 2025
3ce6e22
fix(ci): Pin `torchcodec` (==0.2.1) to fix pipeline temporarly (#1030)
AdilZouitine Apr 24, 2025
2e5aab3
Update tutorial (#1021)
pkooij Apr 28, 2025
be8f9a4
Add description motor order SO-101 leader (#1051)
pkooij Apr 29, 2025
1a45b26
feat(encoding): switching to PyAV for ffmpeg related tasks (#983)
CarolinePascal Apr 29, 2025
d3f5991
feat(docs): Add new docs build process (#1046)
pkooij May 2, 2025
60b5a21
Docs: adapt text + fix video code (#1064)
pkooij May 2, 2025
9d59f12
Fix typos (#1070)
omahs May 5, 2025
8bcfe4e
docs: minor corrections and clean-up (#1089)
pkooij May 9, 2025
a220c15
Update 10_use_so100.md; use diff syntax (#944)
mishig25 May 9, 2025
a1793bc
Update 12_use_so101.md (#1081)
CharlesCNorton May 9, 2025
d3fc33e
bug fix for #1071 When --display_data=true, Failed running control_ro…
masato-ka May 9, 2025
5517320
Add editable -e for feetech install command (#1133)
pkooij May 20, 2025
e099821
Fix: emptying action queue between resets (#1117)
fracapuano May 22, 2025
d162f08
fix: typos and grammar (#1148)
DeVikingMark May 25, 2025
06271de
Update README.md (#1160)
mshukor May 27, 2025
8427a73
Update README.md (#1163)
mshukor May 27, 2025
6eb03fb
[Fix] Unpin torch beyond 2.6.0 & torchcodec beyond 0.2.1 (#1127)
AdilZouitine May 28, 2025
8ad376a
(hotfix): nightly CI by clipping pymunk version below 7.0.0 (#1182)
AdilZouitine Jun 2, 2025
4583b99
[pre-commit.ci] pre-commit autoupdate (#1048)
pre-commit-ci[bot] Jun 2, 2025
eba1747
Add SmolVLA (#1175)
mshukor Jun 3, 2025
8457cfd
Fix SmolVLA loss not sent to wandb (#1198)
ben-z Jun 5, 2025
42bad54
Hardware API redesign (#777)
aliberts Jun 5, 2025
6384eee
fix(smolvla): update record.py, fix populate_queues and remove unused…
imstevenpmwork Jun 6, 2025
79d922d
replaced OBS_ROBOT with OBS_STATE constant (#1211)
utterwqlnut Jun 6, 2025
60feeaf
Fix test_teleoperate (#1216)
aliberts Jun 6, 2025
335c38b
Fix LeKiwi example (#1217)
aliberts Jun 6, 2025
83c0c1f
Fix smolVLA dependencies (#1218)
aliberts Jun 6, 2025
f9db80c
fix(pyserial): adding pyserial dependency to global ones (#1219)
CarolinePascal Jun 6, 2025
9ec68eb
Update SmolVLA README.md (#1228)
mshukor Jun 8, 2025
4da5d93
Fix unable to set camera width/height to non-default (#1225)
ben-z Jun 10, 2025
b275656
Update tutorial link (#1250)
Tiryoh Jun 10, 2025
3b32731
update KochFollower.get_observation() so it returns same observation …
skalade Jun 10, 2025
79b928e
[pre-commit.ci] pre-commit autoupdate (#1185)
pre-commit-ci[bot] Jun 10, 2025
36908fc
Proposal for fix for enter_pressed on Windows (#1230)
koenvanwijk Jun 10, 2025
235d8b3
fix: update pi0 dependency version constraint (#1247)
YushunXiang Jun 10, 2025
3305d2e
Match motor names with ids lekiwi (#1261)
pkooij Jun 11, 2025
bf99e98
fix issues: checkpoints keys mismatch and 'task' tokenisation in smol…
danaaubakirova Jun 11, 2025
50e6761
fix(docs): update realsense documentation (#1268)
imstevenpmwork Jun 11, 2025
456359c
Use HF Papers (#1120)
qgallouedec Jun 12, 2025
be64bd2
Skip normalization parameters in load_smolvla (#1274)
aliberts Jun 13, 2025
8460c7c
fix(record): no teleop needed when running with policy (#1284)
imstevenpmwork Jun 13, 2025
0d2800d
Port HIL SERL (#644)
AdilZouitine Jun 13, 2025
402f14a
fix(docs): SmolVLA fine-tuning getting started (#1201)
danaaubakirova Jun 13, 2025
c662f8c
chore(teleop): print calibration path saved (#1286)
imstevenpmwork Jun 13, 2025
bd4cc25
chore(dependencies): add gamepad support with pygame and hidapi (#1287)
AdilZouitine Jun 13, 2025
0bfc27d
Robot integration tutorial (#1285)
aliberts Jun 13, 2025
f775326
fix(docs): update send_feedback docstrings
imstevenpmwork Jun 13, 2025
88f137d
Add sim tutorial, fix lekiwi motor config, add notebook links (#1275)
pkooij Jun 13, 2025
814e48f
Fixes on robot integration tutorial (#1290)
aliberts Jun 13, 2025
c54e9d4
Add keyboard teleop device to control the end effector robot (#1289)
michel-aractingi Jun 14, 2025
3d920f7
Improve type hints (#1293)
tidely Jun 14, 2025
67d016b
fix(record): no teleop arg in reset environment (#1294)
imstevenpmwork Jun 14, 2025
27e47fe
`learner.py` import so101_leader instead of so100 (#1295)
michel-aractingi Jun 14, 2025
3933448
Fixing `PI0` Policy (#1297)
fracapuano Jun 14, 2025
2c83f2e
`gym_manipulator.py` Remove None value action_intervention of BaseLea…
michel-aractingi Jun 14, 2025
c27735a
(chore): incorrect resume parameter in recording documentation (#1301)
DavidLMS Jun 14, 2025
ee63451
Update lekiwi.mdx (#1229)
koenvanwijk Jun 14, 2025
16ce5e7
bump `pi0` and `hil` transformers version (#1298)
fracapuano Jun 15, 2025
04d46e5
docs: fix imitation learning robots docs command (#1308)
imstevenpmwork Jun 15, 2025
e46cccb
fix(benchmarks): remove .numpy() from frame in benchmark script (#1354)
imstevenpmwork Jun 19, 2025
fee9422
add smolvla to the supported policies to run tests (:
Jun 21, 2025
1317a99
add: chunk-level access for the policy
Jun 21, 2025
5c3119d
Merge branch 'main' into user/fracapuano/2025-04-23-predicting-chunks
fracapuano Jun 21, 2025
ab06419
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 21, 2025
7fbf738
add: smolvla in availables
Jun 21, 2025
b307886
remove: smolvla from library supported policies
Jun 26, 2025
197b3f4
fix: change env for training, xarm is broken as of now
Jun 26, 2025
35b7a08
add: predict_action_chunk to all supported policies
Jun 26, 2025
6a8f2bf
fix: add robot type constants
Jun 26, 2025
ffc3d8f
add: predict action chunk in base policy class
Jun 26, 2025
a4074f3
restore original Makefile
Jun 26, 2025
21734e5
fix: minor
Jun 26, 2025
8df1809
fix: dict keys come from lerobot/constants
Jun 26, 2025
342e3f2
fix: improve act encapsulation, properly supporting temporal ensembling
Jun 26, 2025
d0187a3
fix: smolvla action chunking
Jun 26, 2025
aa01e8c
fix: very minor, but very annoying
Jun 26, 2025
b70573e
fix: minor
Jun 26, 2025
bdb1f5c
fix minor naming
fracapuano Jun 26, 2025
cdeaf19
fix: refactoring inference for single actions and chunks into differe…
Jun 26, 2025
cba1e62
fix: minor
Jun 26, 2025
d4277d1
fix: temporal ensembling
Jun 26, 2025
e653a58
fix: moving populate queues out of modular component for batch prepar…
Jun 26, 2025
bcfb66e
Merge branch 'main' into user/fracapuano/2025-04-23-predicting-chunks
imstevenpmwork Jun 26, 2025
a7ba5ab
fix: minor for CI
Jun 26, 2025
9a2fe6a
fix: smovla debug
Jun 26, 2025
9617c90
fix: reward classifier, maybe the last policy lacking?
Jun 26, 2025
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
31 changes: 31 additions & 0 deletions lerobot/common/policies/act/modeling_act.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,37 @@ def select_action(self, batch: dict[str, Tensor]) -> Tensor:
self._action_queue.extend(actions.transpose(0, 1))
return self._action_queue.popleft()

@torch.no_grad
def predict_chunk(self, batch: dict[str, Tensor]) -> Tensor:
"""Predict a chunk of actions given environment observations.

This method returns the raw chunk of actions predicted by the model without
any queue management or action consumption logic.

Args:
batch: A dictionary of observation tensors.

Returns:
A tensor of shape (batch_size, chunk_size, action_dim) containing predicted actions.
"""
self.eval()

batch = self.normalize_inputs(batch)
if self.config.image_features:
batch = dict(batch) # shallow copy so that adding a key doesn't modify the original
batch["observation.images"] = [batch[key] for key in self.config.image_features]

# If we are using temporal ensembling
if self.config.temporal_ensemble_coeff is not None:
actions = self.model(batch)[0] # (batch_size, chunk_size, action_dim)
actions = self.unnormalize_outputs({"action": actions})["action"]
return actions

# Standard action prediction
actions = self.model(batch)[0]
actions = self.unnormalize_outputs({"action": actions})["action"]
return actions

def forward(self, batch: dict[str, Tensor]) -> tuple[Tensor, dict]:
"""Run the batch through the model and compute the loss for training or validation."""
batch = self.normalize_inputs(batch)
Expand Down
Loading