Commit Graph

1152 Commits

Author SHA1 Message Date
Jade Choghari 2c17433f4d make it work 2025-09-17 11:16:42 +02:00
Jade Choghari d31283cc5d refactor with pipeline 2025-09-17 09:49:19 +02:00
Steven Palma d8feb22f93 test(processor): fix isinstance and cuda test 2025-09-16 18:31:41 +02:00
Steven Palma 9073d64050 Merge branch 'main' into user/azouitine/2025-7-4-convert-codebase-with-pipeline 2025-09-16 18:05:45 +02:00
Steven Palma d6ce7bd330 chore(processor): update comments in record.py 2025-09-16 18:04:44 +02:00
Jade Choghari 55e752f0c2 docs(dataset): add dataset v3 documentation (#1956)
* add v3 doc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix

* update changes

* iterate on review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add changes

* create dataset section

* Update docs/source/lerobot-dataset-v3.mdx

Signed-off-by: Francesco Capuano <74058581+fracapuano@users.noreply.github.com>

* Update docs/source/lerobot-dataset-v3.mdx

Signed-off-by: Francesco Capuano <74058581+fracapuano@users.noreply.github.com>

* Update docs/source/lerobot-dataset-v3.mdx

Signed-off-by: Francesco Capuano <74058581+fracapuano@users.noreply.github.com>

---------

Signed-off-by: Francesco Capuano <74058581+fracapuano@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Michel Aractingi <michel.aractingi@huggingface.co>
Co-authored-by: Francesco Capuano <74058581+fracapuano@users.noreply.github.com>
2025-09-16 17:45:38 +02:00
Steven Palma 43eb0e375f fix(processor): enforce signatures 2025-09-16 17:13:07 +02:00
AdilZouitine fa8be1c4fe test(processor): update tests to handle missing or invalid task keys
- Modified tests to assert that the processor raises appropriate exceptions when the task key is missing or has an invalid value in the complementary data.
- Ensured that the tests cover cases for None, integer, and mixed list task values, improving robustness against invalid inputs.
2025-09-16 16:52:10 +02:00
Adil Zouitine a7d1179aab fix(processor): Preserve stats overrides in normalizer load_state_dict and fix training resumption (#1958)
* feat(processor): enhance normalization handling and state management

- Added support for additional normalization modes including IDENTITY.
- Introduced a new function `clean_state_dict` to remove specific substrings from state dict keys.
- Implemented preservation of explicitly provided normalization statistics during state loading.
- Updated training script to conditionally provide dataset statistics based on resume state.
- Expanded tests to verify the correct behavior of stats override preservation and loading.

* fix(train): remove redundant comment regarding state loading

- Removed a comment that noted the preprocessor and postprocessor state is already loaded when resuming training, as it was deemed unnecessary for clarity.
2025-09-16 16:45:13 +02:00
Steven Palma 772da63a8e test(async): fix feature manipulation (#1957)
* test(async): fix feature manipulation

* chore(processor): remove unused functions
2025-09-16 15:49:32 +02:00
Steven Palma 27a229ea64 chore(examples): homogenize style across example files (#1955)
* chore(examples): homogenize style across example files

* chore(examples): homogenize style across example files eval + replay

* chore(examples): homogenize headers
2025-09-16 14:56:36 +02:00
Jade Choghari 0d1e57f032 improve annotation and info dict
Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 14:21:11 +02:00
Pepijn e2eff72ec0 feat(ee): add so100_to_so100_EE replay and evaluate examples 2025-09-16 13:56:44 +02:00
Jade Choghari d0d9036304 fix test failing
Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 13:51:05 +02:00
Steven Palma 5d79869934 chore(processor): remove unused transition_features dict 2025-09-16 13:13:09 +02:00
Jade Choghari 7403060ad6 add cmake
Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 13:12:31 +02:00
Jade Choghari 89aaaf1556 add cmake
Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 13:12:04 +02:00
Jade Choghari c7e976d812 Change max_parallel_tasks to 1
Reduce the maximum number of parallel tasks from 5 to 1.

Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 12:59:43 +02:00
Jade Choghari 1a4a47e804 Change max_parallel_tasks from 5 to 1
Signed-off-by: Jade Choghari <chogharijade@gmail.com>
2025-09-16 12:58:56 +02:00
Jade Choghari 4fe5c3ab70 Add libero (#1950)
* add libero

* backup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add factory

* Add LIBERO as a submodule

* add changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add multitask

* remove photos

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* bug remove

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix video paths and train.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix renaming issues with cams

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update .gitignore

* final refactor/fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add safethread support

* ad

* Add dep (#4)

* Add 'libero' dependencies to pyproject.toml

* Add Git dependencies for egl_probe and LIBERO

* Update libero-requirements.txt

* add future dep

* update bash

* quick fix

* remove step1

* cleanup (#5)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* clean

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cleanup 2

* improve install

* Delete libero-requirements.txt

* iterate on review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add docs for eval

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* doc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update doc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove brkpt

* fix docs

* update docs/script

* update doc

* skip test warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* hotfix: flip actions

* add train

* new things

* More things

* add new changes

* iterate on review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unces

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* new changes

* iterate on review

* remove files

* factor

* update installation

* doc title

* make it reproducible

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* iterate on review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove files

* update tests

* update doc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove sh files

* add gym

---------

Signed-off-by: Jade Choghari <chogharijade@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jade Choghari (jchoghar) <chogharijade@gmai.com>
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-09-16 12:05:32 +02:00
Steven Palma cf7946e602 chore(processors): tokenizers raises and remove tensor conversion (#1949) 2025-09-16 11:44:02 +02:00
AdilZouitine b12a386334 docs(debug): enhance debugging guide for processor pipelines
- Streamlined the introduction to clarify the challenges of debugging complex processor pipelines.
- Expanded the section on hooks, detailing their purpose and implementation for runtime monitoring.
- Introduced step-by-step debugging techniques, emphasizing the use of the `step_through()` method for inspecting intermediate states.
- Added examples of feature validation to ensure data structure contracts are met.
- Consolidated best practices for debugging, highlighting the synergy between hooks, step-through debugging, and feature validation.
2025-09-16 10:26:05 +02:00
AdilZouitine cee5a3fec5 docs(processor): enhance tutorial on implementing custom processors
- Updated the tutorial to use `NormalizerProcessorStep` as the primary example, clarifying its role in normalizing observations and actions.
- Improved explanations of the need for custom processors, emphasizing data compatibility and processing requirements.
- Added code snippets demonstrating the normalization process and the configuration of processor pipelines.
- Enhanced the introduction to processors, detailing their function as translators between raw robot data and model inputs.
- Included examples of real-world processor configurations for both training and inference scenarios.
2025-09-16 09:13:05 +02:00
Steven Palma 8fb18109ef Merge branch 'main' into user/azouitine/2025-7-4-convert-codebase-with-pipeline 2025-09-15 23:22:31 +02:00
Steven Palma 170d8be7c2 feat(example): Add SO100 EE pipeline control (teleop+record) (#1943)
* feat(examples): add ee so100 processors teleop & record

* refactor(processor): improve FK processor for better use compatability
2025-09-15 23:21:47 +02:00
Steven Palma 8063cd5ed3 test(processor): fix batch expectation 2025-09-15 22:22:17 +02:00
Steven Palma 03891f66da chore(processor): update input output of main 3 processors for better semantics (#1942)
* chore(processor): update input output of main 3 processors for better semantics

* refactor(processor): replace Any with RobotObservation for improved type safety in processors

* fix(processors): no PolicyObservation

* chore(processor): update with RobotObservation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: AdilZouitine <adilzouitinegm@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-15 20:16:43 +02:00
Michel Aractingi 847e74f628 Update dataset card by default (#1936)
* remove condition on model card update
2025-09-15 18:52:30 +02:00
Pepijn 99213daa3e fix cmd record, eval 2025-09-15 17:35:12 +02:00
Steven Palma 42cffd6f2e Merge pull request #1941 from huggingface/chore/merge_main_to_pipeline
chore: merge main to pipeline
2025-09-15 15:28:37 +02:00
Steven Palma 7b1b37b696 Merge branch 'main' into chore/merge_main_to_pipeline 2025-09-15 15:17:24 +02:00
Pepijn 4382742681 fix teleop, record and eval (#1940) 2025-09-15 14:39:05 +02:00
Francesco Capuano 33cad37054 Add Streaming Dataset (#1613)
Co-authored-by: Michel Aractingi <michel.aractingi@huggingface.co>
2025-09-15 14:08:01 +02:00
AdilZouitine e8d79b5191 refactor(docs): streamline monitoring hooks and enhance performance reporting
- Removed the log_shapes and measure_performance hooks, simplifying the monitoring process to focus on NaN checks.
- Updated performance reporting to include maximum processing times alongside average times for better insights.
- Clarified documentation regarding the processing pipeline and feature transformations.
2025-09-15 14:01:04 +02:00
Adil Zouitine 066308ceb8 refactor(processor): replace ModelHubMixin with HubMixin and enhance save_pretrained method (#1937)
- Updated DataProcessorPipeline to use HubMixin instead of ModelHubMixin for improved functionality.
- Refactored save_pretrained method to handle saving
2025-09-15 13:13:35 +02:00
Steven Palma 40e9ddd1ed fix(processors): make sure nested dict are also shallow copied (#1939) 2025-09-15 13:10:10 +02:00
Michel Aractingi f55c6e89f0 Dataset v3 (#1412)
Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
Co-authored-by: Remi Cadene <re.cadene@gmail.com>
Co-authored-by: Tavish <tavish9.chen@gmail.com>
Co-authored-by: fracapuano <francesco.capuano@huggingface.co>
Co-authored-by: CarolinePascal <caroline8.pascal@gmail.com>
2025-09-15 09:53:30 +02:00
Steven Palma c69f23723e refactor(processor): transform_features loop + EAFP (#1932) 2025-09-14 16:07:32 +02:00
Steven Palma 50293bb17b refactor(processors): several additions (#1926)
* chore(processor): remove merge_transitions functions (#1925)

* refactor(processors): move processors out of configs (#1927)

* chore(processor): streamline combine_features_dict (#1928)

* chore(policies): use new constants (#1929)

* fix(deps): right version transformers (#1930)

* fix(tests): add none + disable async tests for now (#1931)
2025-09-13 23:53:20 +02:00
Pepijn 839ac5f2aa fix(processor): phone examples (#1921)
* fix(processor): phone examples

* chore(processor): simplify gripper in phone example kinematic chain

---------

Co-authored-by: Steven Palma <steven.palma@huggingface.co>
2025-09-13 21:25:19 +02:00
AdilZouitine 0479eb8f69 docs: Add new section for debugging processor pipelines
- Introduced a new documentation entry for debugging processor pipelines, enhancing the existing guide on processors.
- This addition aims to provide users with insights and best practices for troubleshooting and optimizing their processor workflows.
2025-09-12 18:09:23 +02:00
Adil Zouitine a877c596ba chore(docs): Processor doc (#1685)
* chore(docs): initialize doc

* Added script for the second part of the processor doc

* precommit style nit

* improved part 2 of processor guide

* Add comprehensive documentation for processors in robotics

- Introduced a detailed guide on processors, covering their role in transforming raw robot data into model-ready inputs and vice versa.
- Explained core concepts such as EnvTransition, ProcessorStep, and RobotProcessor, along with their functionalities.
- Included examples of common processor steps like normalization, device management, batch processing, and text tokenization.
- Provided insights on building complete pipelines, integrating processors into training loops, and saving/loading configurations.
- Emphasized best practices and advanced features for effective usage of processors in robotics applications.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* feat(docs): Enhance introduction to processors with additional converter functions

- Updated the introduction to processors documentation to include default batch-to-transition and transition-to-batch converters.
- Added detailed descriptions and examples for new specialized converter functions: `to_transition_teleop_action`, `to_transition_robot_observation`, `to_output_robot_action`, and `to_dataset_frame`.
- Improved clarity on how these converters facilitate integration with existing robotics applications.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improved doc implement_your_own_pipeline
- Use normalization processor as default example
- Add section on transform features
- Add section on overrides.

* Add phone docs and use pipeline for robots/teleop docs

* Fix typo in documentation for adapters in robots/teleop section

* Enhance documentation for processors with detailed explanations and examples

- Updated the introduction to processors, clarifying the role of `EnvTransition` and `ProcessorStep`.
- Introduced `DataProcessorPipeline` as a generic orchestrator for chaining processor steps.
- Added comprehensive descriptions of new converter functions and their applications.
- Improved clarity on type safety and the differences between `RobotProcessorPipeline` and `PolicyProcessorPipeline`.
- Included examples for various processing scenarios, emphasizing best practices for data handling in robotics.

* Enhance documentation for processor migration and debugging

- Added detailed sections on the migration of models to the new `PolicyProcessorPipeline` system, including breaking changes and migration scripts.
- Introduced a comprehensive guide for debugging processor pipelines, covering common issues, step-by-step inspection, and runtime monitoring techniques.
- Updated examples to reflect new usage patterns and best practices for processor implementation and error handling.
- Clarified the role of various processor steps and their configurations in the context of robotics applications.

---------

Co-authored-by: Michel Aractingi <michel.aractingi@huggingface.co>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pepijn <pepijn@huggingface.co>
2025-09-12 18:00:37 +02:00
Steven Palma 1ccdf365d2 docs(processor): update docstrings pipeline (#1920) 2025-09-12 17:54:27 +02:00
Pepijn 6bdcd460e0 use observation instead of obs 2025-09-12 12:18:00 +02:00
Pepijn 2005a28a00 add empty obs and act in create_initial_features 2025-09-12 12:17:46 +02:00
Pepijn 58b91dc886 fixes for rotation matrix 2025-09-12 11:57:59 +02:00
Pepijn 8e0f5cd052 fixes for processors used in phone teleop 2025-09-12 11:57:48 +02:00
AdilZouitine f51272362c refactor(processor): update migration script for policy normalization and hub integration
- Modified the migration script to include a branch argument for pushing to the hub, enhancing flexibility in version control.
- Improved error handling by ensuring the policy type is extracted from the configuration, promoting robustness.
- Streamlined the process of saving and pushing model components to the hub, allowing for a single commit with optional PR creation.
- Updated the commit message and description for better clarity on the migration changes and benefits, ensuring users are informed of the new architecture and usage.
2025-09-11 21:06:25 +02:00
Steven Palma cd0098a5f7 debug(scripts): simplify record with processors (#1918)
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-09-11 18:20:39 +02:00
AdilZouitine efde42d4a9 refactor(processor): migrate policy normalization to use factory functions
- Updated the migration script to utilize `make_pre_post_processors` and `make_policy_config` from `lerobot.policies.factory`, enhancing consistency with the current codebase.
- Improved normalization statistics extraction and processor pipeline creation, ensuring compatibility with the new `PolicyProcessorPipeline` architecture.
- Cleaned up configuration handling by removing unnecessary fields and adding normalization mapping directly to the config.
- Enhanced type safety and readability by refining feature type and normalization mode handling.
2025-09-11 18:14:13 +02:00