huggingface / huggingface/leLab
Feature Request: run inference with a policy from a third-party lerobot plugin
- Dominant language
- TypeScript
- Stars
- 171
- Forks
- 60
- Avg merge
- 1d 52m
- Merged PRs (30d)
- 5
Description
lerobot already supports third-party policy plugins — a pip-installed package named `lerobot_policy_` registers its own policy type into `PreTrainedConfig`'s choice registry (draccus `ChoiceRegistry`), and `lerobot-rollout` already calls `register_third_party_plugins()` at startup to discover and import it. The policy class and its pre/post-processors both resolve through the same dynamic-import-by-naming-convention lerobot already has (`configuration_.py`, `modeling_.py`, `processor_.py`) — nothing needed on lerobot's side, and nothing needed in LeLab's `lelab/rollout.py` either: `_resolve_policy_path()` already accepts an arbitrary local checkpoint directory or Hub ref verbatim.
The actual gap is the UI. `InferenceModal.tsx` only ever builds `policy_ref` from `/jobs/{id}/checkpoints` — checkpoints from one of your own LeLab training runs. There's no way to point inference at a checkpoint that isn't tied to a LeLab job: a plugin-trained policy sitting in a local directory, or a Hub repo you didn't train through LeLab.
Fix: add a free-text "custom policy path / Hub ref" input to the inference modal as an alternative to the job-checkpoint dropdown, wired straight to `policy_ref` the same way. As long as the plugin package (`lerobot_policy_`) is pip-installed in the same environment LeLab's `lerobot-rollout` subprocess runs in, and the checkpoint's `config.json` declares that type, it should already just work.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in InferenceModal.tsx, where policy_ref is currently built from /jobs/{id}/checkpoints and the job-checkpoint dropdown is rendered. Add the custom policy path / Hub ref as an alternative wired to policy_ref, then verify that either source produces the expected inference request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100