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

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2025-04-13 10:07:08 +00:00
parent 9907f2b041
commit 6882dfd012
2 changed files with 5 additions and 5 deletions

View File

@ -81,8 +81,8 @@ def make_dataset(cfg: TrainPipelineConfig) -> LeRobotDataset | MultiLeRobotDatas
image_transforms = ( image_transforms = (
ImageTransforms(cfg.dataset.image_transforms) if cfg.dataset.image_transforms.enable else None ImageTransforms(cfg.dataset.image_transforms) if cfg.dataset.image_transforms.enable else None
) )
if cfg.dataset.repo_id.startswith('['): if cfg.dataset.repo_id.startswith("["):
datasets = cfg.dataset.repo_id.strip('[]').split(',') datasets = cfg.dataset.repo_id.strip("[]").split(",")
datasets = [x.strip() for x in datasets] datasets = [x.strip() for x in datasets]
delta_timestamps = {} delta_timestamps = {}
for ds in datasets: for ds in datasets:
@ -98,7 +98,7 @@ def make_dataset(cfg: TrainPipelineConfig) -> LeRobotDataset | MultiLeRobotDatas
) )
logging.info( logging.info(
"Multiple datasets were provided. Applied the following index mapping to the provided datasets: " "Multiple datasets were provided. Applied the following index mapping to the provided datasets: "
f"{pformat(dataset.repo_id_to_index , indent=2)}" f"{pformat(dataset.repo_id_to_index, indent=2)}"
) )
else: else:
ds_meta = LeRobotDatasetMetadata(cfg.dataset.repo_id) ds_meta = LeRobotDatasetMetadata(cfg.dataset.repo_id)

View File

@ -49,8 +49,8 @@ def cfg_to_group(cfg: TrainPipelineConfig, return_list: bool = False) -> list[st
"""Return a group name for logging. Optionally returns group name as list.""" """Return a group name for logging. Optionally returns group name as list."""
# TODO: these were used to support multirepodataset in the past - think how they could be supported in new way? # TODO: these were used to support multirepodataset in the past - think how they could be supported in new way?
dataset_tag = cfg.dataset.repo_id dataset_tag = cfg.dataset.repo_id
if dataset_tag.startswith('['): if dataset_tag.startswith("["):
tags = dataset_tag.strip('[]').split(',') tags = dataset_tag.strip("[]").split(",")
dataset_tag = f"{tags[0].strip()}_and_more" dataset_tag = f"{tags[0].strip()}_and_more"
lst = [ lst = [
f"policy:{cfg.policy.type}", f"policy:{cfg.policy.type}",