embodichain.data#
Data Package Overview#
The embodichain.data package centralizes dataset resolution and asset download
helpers used by simulation tasks and training pipelines.
Submodules
Constants#
Dataset Resolution#
Classes:
Functions:
|
Retrieve the dataset class from the available modules. |
|
Get the absolute path of the data file. |
- class embodichain.data.dataset.EmbodiChainDataset[source]#
Bases:
DownloadDatasetMethods:
__init__(self, prefix, data_descriptor[, ...])calculate_md5(file_path[, chunk_size])Calculate the MD5 checksum of a file.
check_zip(prefix, data_descriptor, path)Check the integrity of the zip file and its extracted contents.
- embodichain.data.dataset.get_data_class(dataset_name, extra_modules=None)[source]#
Retrieve the dataset class from the available modules.
- Parameters:
dataset_name (str) – The name of the dataset class.
extra_modules (list[str] | None) – Optional list of additional module names to search for the dataset class.
- Returns:
The dataset class.
- Return type:
type
- Raises:
AttributeError – If the dataset class is not found in any module.
- embodichain.data.dataset.get_data_path(data_path_in_config)[source]#
Get the absolute path of the data file.
- Resolution order:
If
data_path_in_configis an absolute path, return it directly.If a matching file/directory exists under
EMBODICHAIN_DEFAULT_DATA_ROOT(which can be overridden via theEMBODICHAIN_DATA_ROOTenvironment variable), return that path.Otherwise, resolve via the registered data-class download mechanism.
- Parameters:
data_path_in_config (str) – The dataset path in the format
"dataset_name/subpath".- Returns:
The absolute path of the data file.
- Return type:
str
Asset Download CLI#
CLI tool for pre-downloading EmbodiChain data assets.
Usage:
# List all available assets
python -m embodichain.data.download list
# List assets in a specific category
python -m embodichain.data.download list --category robot
# Download a specific asset by name
python -m embodichain.data.download download --name CobotMagicArm
# Download all assets in a category
python -m embodichain.data.download download --category robot
# Download everything
python -m embodichain.data.download download --all
Functions:
|
Download assets by name, category, or everything. |
|
List available assets. |
|
Instantiate an asset class to trigger download, then ensure extraction. |
|
Find an asset class by name (case-insensitive) across all categories. |
Build |
|
|
- embodichain.data.download.cmd_download(args)[source]#
Download assets by name, category, or everything.
- Return type:
None
- embodichain.data.download.download_asset(cls_name, cls)[source]#
Instantiate an asset class to trigger download, then ensure extraction.
- Return type:
None
- embodichain.data.download.find_asset_class(name, registry)[source]#
Find an asset class by name (case-insensitive) across all categories.
- Return type:
tuple[str,type] |None
Enums#
Classes:
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
An enumeration. |
|
LeRobot standard field keys - official LeRobot dataset format. |
|
SemanticMask is an enumeration representing different semantic regions in an image or scene. |
- class embodichain.data.enum.ActionMode[source]#
Bases:
EnumAn enumeration.
Attributes:
- ABSOLUTE = ''#
- RELATIVE = 'delta_'#
- class embodichain.data.enum.ControlParts[source]#
Bases:
EnumAn enumeration.
Attributes:
- HEAD = 'head'#
- LEFT_ARM = 'left_arm'#
- LEFT_EEF = 'left_eef'#
- RIGHT_ARM = 'right_arm'#
- RIGHT_EEF = 'right_eef'#
- WAIST = 'waist'#
- class embodichain.data.enum.EefExecute[source]#
Bases:
EnumAn enumeration.
Attributes:
- CLOSE = 'execute_close'#
- OPEN = 'execute_open'#
- class embodichain.data.enum.EefType[source]#
Bases:
EnumAn enumeration.
Attributes:
- POSE = 'eef_pose'#
- class embodichain.data.enum.EndEffector[source]#
Bases:
EnumAn enumeration.
Attributes:
- DEXTROUSHAND = 'hand'#
- GRIPPER = 'gripper'#
- class embodichain.data.enum.Hints[source]#
Bases:
EnumAn enumeration.
Attributes:
- ARM = ('left_arm', 'right_arm')#
- EEF = ('left_eef', 'right_eef', 'gripper', 'hand')#
- class embodichain.data.enum.JointType[source]#
Bases:
EnumAn enumeration.
Attributes:
- QPOS = 'qpos'#
- class embodichain.data.enum.LeRobotKey[source]#
Bases:
EnumLeRobot standard field keys - official LeRobot dataset format.
Attributes:
- ACTION = 'action'#
- ACTION_PREFIX = 'action.'#
- ACTION_TOKENS = 'action.tokens'#
- ACTION_TOKEN_MASK = 'action.token_mask'#
- DONE = 'next.done'#
- INFO = 'info'#
- OBS_ENV_STATE = 'observation.environment_state'#
- OBS_IMAGE = 'observation.image'#
- OBS_IMAGES = 'observation.images'#
- OBS_LANGUAGE = 'observation.language'#
- OBS_LANGUAGE_ATTENTION_MASK = 'observation.language.attention_mask'#
- OBS_LANGUAGE_SUBTASK = 'observation.subtask'#
- OBS_LANGUAGE_SUBTASK_ATTENTION_MASK = 'observation.subtask.attention_mask'#
- OBS_LANGUAGE_SUBTASK_TOKENS = 'observation.subtask.tokens'#
- OBS_LANGUAGE_TOKENS = 'observation.language.tokens'#
- OBS_PREFIX = 'observation.'#
- OBS_QF = 'observation.qf'#
- OBS_QVEL = 'observation.qvel'#
- OBS_STATE = 'observation.state'#
- OBS_STR = 'observation'#
- REWARD = 'next.reward'#
- TRUNCATED = 'next.truncated'#
- class embodichain.data.enum.SemanticMask[source]#
Bases:
IntEnumSemanticMask is an enumeration representing different semantic regions in an image or scene.
- BACKGROUND#
Represents the background region (value: 0).
- Type:
int
- FOREGROUND#
Represents the foreground objects (value: 1).
- Type:
int
- ROBOT_LEFT#
Represents the left robot region (value: 2).
- Type:
int
- ROBOT_RIGHT#
Represents the right robot region (value: 3).
- Type:
int
Attributes:
Methods:
__new__(value)- BACKGROUND = 0#
- FOREGROUND = 1#
- ROBOT_LEFT = 2#
- ROBOT_RIGHT = 3#
- __new__(value)#