* 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>
- Updated imports in various files to include RobotAction and PolicyAction directly from the processor module, improving clarity and consistency.
- Removed redundant imports from core, streamlining the codebase and enhancing maintainability.
- Adjusted type annotations and references in the RobotProcessorPipeline and related components to align with the new import structure, ensuring better type safety and readability.
* refactor(processor): enhance type annotations for processors in record, replay, teleoperate, and control utils
- Updated type annotations for preprocessor and postprocessor parameters in record_loop and predict_action functions to specify the expected dictionary types.
- Adjusted robot_action_processor type in ReplayConfig and TeleoperateConfig to improve clarity and maintainability.
- Ensured consistency in type definitions across multiple files, enhancing overall code readability.
* refactor(processor): enhance type annotations for RobotProcessorPipeline in various files
- Updated type annotations for RobotProcessorPipeline instances in evaluate.py, record.py, replay.py, teleoperate.py, and other related files to specify input and output types more clearly.
- Introduced new type conversions for PolicyAction and EnvTransition to improve type safety and maintainability across the processing pipelines.
- Ensured consistency in type definitions, enhancing overall code readability and reducing potential runtime errors.
* refactor(processor): update transition handling in processors to use transition_to_batch
- Replaced direct transition handling with transition_to_batch in various processor tests and implementations to ensure consistent batching of input data.
- Updated assertions in tests to reflect changes in data structure, enhancing clarity and maintainability.
- Improved overall code readability by standardizing the way transitions are processed across different processor types.
* refactor(tests): standardize transition key usage in processor tests
- Updated assertions in processor test files to utilize the TransitionKey for action references, enhancing consistency across tests.
- Replaced direct string references with TransitionKey constants for improved readability and maintainability.
- Ensured that all relevant tests reflect these changes, contributing to a more uniform approach in handling transitions.
* refactor(processor): split action from policy, robots and environment
- Updated function names to robot_action_to_transition and robot_transition_to_action across multiple files to better reflect their purpose in processing robot actions.
- Adjusted references in the RobotProcessorPipeline and related components to ensure compatibility with the new naming convention.
- Enhanced type annotations for action parameters to improve code readability and maintainability.
* refactor(converters): rename robot_transition_to_action to transition_to_robot_action
- Updated function names across multiple files to improve clarity and consistency in processing robot actions.
- Adjusted references in RobotProcessorPipeline and related components to align with the new naming convention.
- Simplified action handling in the AddBatchDimensionProcessorStep by removing unnecessary checks for action presence.
* refactor(converters): update references to transition_to_robot_action
- Renamed all instances of robot_transition_to_action to transition_to_robot_action across multiple files for consistency and clarity in the processing of robot actions.
- Adjusted the RobotProcessorPipeline configurations to reflect the new naming convention, enhancing code readability.
* refactor(processor): update Torch2NumpyActionProcessorStep to extend ActionProcessorStep
- Changed the base class of Torch2NumpyActionProcessorStep from PolicyActionProcessorStep to ActionProcessorStep, aligning it with the current architecture of action processing.
- This modification enhances the clarity of the class's role in the processing pipeline.
* fix(processor): main action processor can take also EnvAction
---------
Co-authored-by: Steven Palma <steven.palma@huggingface.co>
* refactor(processor): signature of transform_features
* refactor(processor): remove prefixes + processor respect new transform_features signature + update test accordingly
* refactor(processor): rename now is only for visual
* refactor(processor): update normalize processor
* refactor(processor): update vanilla processor features
* refactor(processor): feature contract now uses its own enum
* chore(processor): rename renameprocessor
* chore(processor): minor changes
* refactor(processor): add create & change aggregate
* refactor(processor): update aggregate
* refactor(processor): simplify to functions, fix features contracts and rename function
* test(processor): remove to converter tests as now they are very simple
* chore(docs): recover docs joint observations processor
* fix(processor): update RKP
* fix(tests): recv diff test_pipeline
* chore(tests): add docs to test
* chore(processor): leave obs language constant untouched
* fix(processor): correct new shape of feature in crop image processor
* refactor(logging): enhance log_rerun_data to handle observation and action separately
- Updated the `log_rerun_data` function to accept and log observation and action data more clearly, improving readability and maintainability.
- Refactored the `record_loop` and `teleop_loop` functions to extract and pass observation and action data to `log_rerun_data`, ensuring consistent logging format.
* refactor(tests): update test_log_rerun_data to align with log_rerun_data changes
- Modified test cases in `test_visualization_utils.py` to extract and pass observation and action data separately to `log_rerun_data`, improving clarity and consistency with recent function updates.
- Ensured that the tests reflect the new structure of `log_rerun_data` for better maintainability.
* refactor(processors): simplify calls to log_rerun + replace lambda functions with identity_transition
---------
Co-authored-by: Steven Palma <steven.palma@huggingface.co>
* feat(processor): introduce PolicyProcessorPipeline and RobotProcessorPipeline as type aliases for DataProcessorPipeline
- Added PolicyProcessorPipeline and RobotProcessorPipeline type aliases to enhance clarity and maintainability in the processor module.
- Updated the __all__ list to include the new pipelines for better module export consistency.
* refactor(processor): replace DataProcessorPipeline with PolicyProcessorPipeline across multiple modules
- Updated all instances of DataProcessorPipeline to PolicyProcessorPipeline in various processor files for consistency and clarity.
- Adjusted function signatures to reflect the new pipeline type, enhancing maintainability and readability.
* refactor(processor): update hotswap_stats function to use PolicyProcessorPipeline
- Changed the parameter name from robot_processor to policy_processor for clarity.
- Ensured consistency with recent updates to the processor module by reflecting the new pipeline type in the function signature.
* refactor(processor): replace DataProcessorPipeline with PolicyProcessorPipeline in migrate_policy_normalization.py
- Updated the preprocessor and postprocessor to use PolicyProcessorPipeline for consistency with recent changes in the processor module.
- Enhanced clarity and maintainability by aligning with the new pipeline structure.
* refactor(processor): update hotswap_stats to use PolicyProcessorPipeline
- Changed the parameter type in hotswap_stats from DataProcessorPipeline to PolicyProcessorPipeline for consistency with recent updates.
- Enhanced clarity by updating the function documentation to reflect the new pipeline type.
* refactor(processor): replace DataProcessorPipeline with RobotProcessorPipeline across multiple files
- Updated instances of DataProcessorPipeline to RobotProcessorPipeline in evaluate.py, record.py, replay.py, teleoperate.py, and other relevant files for consistency and clarity.
- Adjusted function signatures and variable types to reflect the new pipeline structure, enhancing maintainability and readability.
* [Port codebase pipeline] General fixes for RL and scripts (#1748)
* Refactor dataset configuration in documentation and codebase
- Updated dataset configuration keys from `dataset_root` to `root` and `num_episodes` to `num_episodes_to_record` for consistency.
- Adjusted replay episode handling by renaming `episode` to `replay_episode`.
- Enhanced documentation
- added specific processor to transform from policy actions to delta actions
* Added Robot action to tensor processor
Added new processor script for dealing with gym specific action processing
* removed RobotAction2Tensor processor; imrpoved choosing observations in actor
* nit in delta action
* added missing reset functions to kinematics
* Adapt teleoperate and replay to pipeline similar to record
* refactor(processors): move to inheritance (#1750)
* fix(teleoperator): improvements phone implementation (#1752)
* fix(teleoperator): protect shared state in phone implementation
* refactor(teleop): separate classes in phone
* fix: solve breaking changes (#1753)
* refactor(policies): multiple improvements (#1754)
* refactor(processor): simpler logic in device processor (#1755)
* refactor(processor): euclidean distance in delta action processor (#1757)
* refactor(processor): improvements to joint observations processor migration (#1758)
* refactor(processor): improvements to tokenizer migration (#1759)
* refactor(processor): improvements to tokenizer migration
* fix(tests): tokenizer tests regression from #1750
* fix(processors): fix float comparison and config in hil processors (#1760)
* chore(teleop): remove unnecessary callbacks in KeyboardEndEffectorTeleop (#1761)
* refactor(processor): improvements normalize pipeline migration (#1756)
* refactor(processor): several improvements normalize processor step
* refactor(processor): more improvements normalize processor
* refactor(processor): more changes to normalizer
* refactor(processor): take a different approach to DRY
* refactor(processor): final design
* chore(record): revert comment and continue deleted (#1764)
* refactor(examples): pipeline phone examples (#1769)
* refactor(examples): phone teleop + teleop script
* refactor(examples): phone replay + replay
* chore(examples): rename phone example files & folders
* feat(processor): fix improvements to the pipeline porting (#1796)
* refactor(processor): enhance tensor device handling in normalization process (#1795)
* refactor(tests): remove unsupported device detection test for complementary data (#1797)
* chore(tests): update ToBatchProcessor test (#1798)
* refactor(tests): remove in-place mutation tests for actions and complementary data in batch processor
* test(tests): add tests for action and task processing in batch processor
* add names for android and ios phone (#1799)
* use _tensor_stats in normalize processor (#1800)
* fix(normalize_processor): correct device reference for tensor epsilon handling (#1801)
* add point 5 add missing feature contracts (#1806)
* Fix PR comments 1452 (#1807)
* use key to determine image
* Address rest of PR comments
* use PolicyFeatures in transform_features
---------
Co-authored-by: Pepijn <138571049+pkooij@users.noreply.github.com>
---------
Co-authored-by: Michel Aractingi <michel.aractingi@huggingface.co>
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
Co-authored-by: Pepijn <138571049+pkooij@users.noreply.github.com>