Skip to main content
This guide provides solutions to common problems you might encounter while using LeRobot.

Installation Issues

Problem: Import errors or syntax errors after installation.Solution: LeRobot requires Python ≥3.12. Check your version:
If you have an older version, create a new environment:
Problem: Errors like ffmpeg not found or Encoder 'libsvtav1' not found.Solution: Install ffmpeg with libsvtav1 support:
ffmpeg 8.X is not yet supported. Use version 7.X.
Problem: Errors related to evdev or input devices on Windows Subsystem for Linux.Solution: Install evdev explicitly:
Problem: Permission errors when installing packages.Solution: Don’t use sudo with pip. Instead:

GPU and CUDA Issues

Problem: RuntimeError: CUDA out of memory during training or inference.Solutions:
  1. Reduce batch size:
  1. Enable gradient accumulation:
  1. Use mixed precision (AMP):
  1. Clear CUDA cache:
  1. Use a smaller model variant or reduce sequence length
Problem: torch.cuda.is_available() returns False.Solutions:
  1. Check NVIDIA driver:
  1. Reinstall PyTorch with CUDA:
  1. Verify installation:
Problem: Errors when using multiple GPUs with DDP.Solution: Use torchrun with correct configuration:

Dataset Issues

Problem: FileNotFoundError or DatasetNotFoundError when loading dataset.Solutions:
  1. Verify dataset exists:
  1. Check authentication (for private datasets):
  1. Use correct repo_id format:
Problem: Errors when loading video frames from dataset.Solutions:
  1. Verify ffmpeg installation:
  1. Clear dataset cache and re-download:
  1. Check disk space:
Problem: Dataset loading takes too long.Solutions:
  1. Use streaming for large datasets:
  1. Increase number of workers:
  1. Cache dataset locally for repeated use
Problem: Inconsistent data or errors after dataset updates.Solution: Clear the dataset cache:

Training Issues

Problem: Loss plateaus or doesn’t decrease during training.Solutions:
  1. Check learning rate:
  1. Verify data normalization:
  1. Increase training steps:
  1. Check for data issues (e.g., all actions similar)
Problem: Loss becomes NaN or Inf during training.Solutions:
  1. Reduce learning rate:
  1. Enable gradient clipping:
  1. Check for numerical instability in custom code
  2. Verify dataset doesn’t contain NaN values:
Problem: Cannot resume training from checkpoint.Solutions:
  1. Verify checkpoint path:
  1. Check version compatibility:
  1. Ensure config matches: The checkpoint config must match your current training config

Robot Hardware Issues

Problem: Cannot connect to robot.Solutions:
  1. Check device permissions:
  1. Verify device path:
  1. Check cable connections and power supply
Problem: High latency causes jerky or delayed robot motion.Solutions:
  1. Use GPU inference:
  1. Enable async inference: See examples/tutorial/async-inf/ for policy server/client pattern
  2. Optimize observation processing:
  • Reduce image resolution
  • Use hardware video encoding
  • Minimize preprocessing steps
  1. Use action chunking (ACT-style policies reduce inference frequency)
Problem: Robot movements are offset or incorrect.Solutions:
  1. Re-run calibration: Follow your robot’s specific calibration procedure
  2. Check for breaking changes: See Backward Compatibility for migration guides
  3. Verify joint limits in robot config
  4. Test with known-good trajectory to isolate issue

Performance Optimization

Solutions:
  1. Use GPU acceleration
  2. Increase batch size (if memory allows)
  3. Use more DataLoader workers:
  1. Enable AMP (automatic mixed precision):
  1. Use multi-GPU training with DDP
Solutions:
  1. Reduce batch size
  2. Use gradient checkpointing:
  1. Clear unused tensors:
  1. Use streaming datasets for large data

Error Messages Reference

Cause: Loading a model trained before PR #1452 with new code.Solution: Migrate the model using the normalization migration script:
See Backward Compatibility for details.
Cause: ffmpeg doesn’t have libsvtav1 encoder compiled.Solution: Install correct ffmpeg version:
Cause: Version mismatch between installed LeRobot and code.Solution:

Getting Help

If you can’t find a solution here:

Search GitHub Issues

Check if your issue has been reported

Ask on Discord

Get help from the community

Open an Issue

Report a new bug with details

Discussions

Ask questions and share ideas

Reporting Bugs

When reporting an issue, please include:
1

Environment Information

2

Minimal Reproduction

Provide the smallest code snippet that reproduces the issue
3

Error Traceback

Include the full error message and stack trace
4

Expected vs Actual

Describe what you expected to happen and what actually happened
The more details you provide, the faster we can help you!