Skip to content

[Python] Fix Torch modes in LeRobot video fallback - #10731

Merged
JingsongLi merged 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-single-camera-torch-mode
Oct 22, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-single-camera-torch-mode

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

When LeRobot video fallback runs in a worker thread, it loses the caller's no_grad() or inference_mode() setting. Capture both Torch modes before dispatch and restore them for each decode task.

Added a single-camera regression that checks normal, no-grad, and inference modes on a reused decode pool. LeRobot tests: 96 passed, 1 skipped; Flake8 passed.

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 8bd0f7f into apache:master Oct 22, 2026
8 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants