mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-17 09:39:47 +00:00
cleanup output from earlier runs
This commit is contained in:
@@ -256,6 +256,8 @@ class MirrorDataAndMetadata(PipelineStep):
|
||||
mirrored[new_key] = value
|
||||
return mirrored
|
||||
|
||||
import shutil
|
||||
|
||||
root = Path(self.root) if self.root else None
|
||||
output_root = Path(self.output_root) if self.output_root else None
|
||||
|
||||
@@ -267,6 +269,11 @@ class MirrorDataAndMetadata(PipelineStep):
|
||||
logger.info("Data and metadata already mirrored, skipping")
|
||||
return
|
||||
|
||||
# Clean up partial output from previous failed runs
|
||||
if output_root.exists():
|
||||
logger.info(f"Removing existing partial output: {output_root}")
|
||||
shutil.rmtree(output_root)
|
||||
|
||||
robot_type = dataset.meta.robot_type or "bi_openarms_follower"
|
||||
mirroring_mask = get_mirroring_mask(robot_type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user