mirror of
https://github.com/huggingface/lerobot.git
synced 2026-06-01 03:11:29 +00:00
* 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.
104 lines
3.4 KiB
Python
104 lines
3.4 KiB
Python
#!/usr/bin/env python
|
|
|
|
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
from .batch_processor import AddBatchDimensionProcessorStep
|
|
from .converters import (
|
|
batch_to_transition,
|
|
create_transition,
|
|
merge_transitions,
|
|
transition_to_batch,
|
|
transition_to_dataset_frame,
|
|
)
|
|
from .core import EnvTransition, TransitionKey
|
|
from .delta_action_processor import MapDeltaActionToRobotActionStep, MapTensorToDeltaActionDictStep
|
|
from .device_processor import DeviceProcessorStep
|
|
from .gym_action_processor import Numpy2TorchActionProcessorStep, Torch2NumpyActionProcessorStep
|
|
from .hil_processor import (
|
|
AddTeleopActionAsComplimentaryDataStep,
|
|
AddTeleopEventsAsInfoStep,
|
|
GripperPenaltyProcessorStep,
|
|
ImageCropResizeProcessorStep,
|
|
InterventionActionProcessorStep,
|
|
RewardClassifierProcessorStep,
|
|
TimeLimitProcessorStep,
|
|
)
|
|
from .joint_observations_processor import JointVelocityProcessorStep, MotorCurrentProcessorStep
|
|
from .normalize_processor import NormalizerProcessorStep, UnnormalizerProcessorStep, hotswap_stats
|
|
from .observation_processor import VanillaObservationProcessorStep
|
|
from .pipeline import (
|
|
ActionProcessorStep,
|
|
ComplementaryDataProcessorStep,
|
|
DataProcessorPipeline,
|
|
DoneProcessorStep,
|
|
IdentityProcessorStep,
|
|
InfoProcessorStep,
|
|
ObservationProcessorStep,
|
|
PolicyProcessorPipeline,
|
|
ProcessorKwargs,
|
|
ProcessorStep,
|
|
ProcessorStepRegistry,
|
|
RewardProcessorStep,
|
|
RobotProcessorPipeline,
|
|
TruncatedProcessorStep,
|
|
)
|
|
from .rename_processor import RenameProcessorStep
|
|
from .tokenizer_processor import TokenizerProcessorStep
|
|
|
|
__all__ = [
|
|
"ActionProcessorStep",
|
|
"AddTeleopActionAsComplimentaryDataStep",
|
|
"AddTeleopEventsAsInfoStep",
|
|
"ComplementaryDataProcessorStep",
|
|
"batch_to_transition",
|
|
"create_transition",
|
|
"DeviceProcessorStep",
|
|
"DoneProcessorStep",
|
|
"EnvTransition",
|
|
"GripperPenaltyProcessorStep",
|
|
"hotswap_stats",
|
|
"IdentityProcessorStep",
|
|
"ImageCropResizeProcessorStep",
|
|
"InfoProcessorStep",
|
|
"InterventionActionProcessorStep",
|
|
"JointVelocityProcessorStep",
|
|
"MapDeltaActionToRobotActionStep",
|
|
"MapTensorToDeltaActionDictStep",
|
|
"merge_transitions",
|
|
"MotorCurrentProcessorStep",
|
|
"NormalizerProcessorStep",
|
|
"Numpy2TorchActionProcessorStep",
|
|
"ObservationProcessorStep",
|
|
"PolicyProcessorPipeline",
|
|
"ProcessorKwargs",
|
|
"ProcessorStep",
|
|
"ProcessorStepRegistry",
|
|
"RenameProcessorStep",
|
|
"RewardClassifierProcessorStep",
|
|
"RewardProcessorStep",
|
|
"DataProcessorPipeline",
|
|
"TimeLimitProcessorStep",
|
|
"AddBatchDimensionProcessorStep",
|
|
"RobotProcessorPipeline",
|
|
"TokenizerProcessorStep",
|
|
"Torch2NumpyActionProcessorStep",
|
|
"transition_to_batch",
|
|
"transition_to_dataset_frame",
|
|
"TransitionKey",
|
|
"TruncatedProcessorStep",
|
|
"UnnormalizerProcessorStep",
|
|
"VanillaObservationProcessorStep",
|
|
]
|