[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-09-03 14:18:02 +00:00
parent 0e04f5fbbe
commit 7868df27dc
+7 -7
View File
@@ -315,13 +315,13 @@ class LeRobotDatasetMetadata:
# Update the Hugging Face dataset by reloading it.
# This process should be fast because only the latest Parquet file has been modified.
# Therefore, only this file needs to be converted to PyArrow; the rest is loaded from the PyArrow memory-mapped cache.
# Explicitly delete old dataset to free memory before reloading
if hasattr(self, 'episodes') and self.episodes is not None:
if hasattr(self, "episodes") and self.episodes is not None:
del self.episodes
self.episodes = None
gc.collect()
gc.collect()
self.episodes = load_episodes(self.root)
def save_episode(
@@ -1059,13 +1059,13 @@ class LeRobotDataset(torch.utils.data.Dataset):
# Update the Hugging Face dataset by reloading it.
# This process should be fast because only the latest Parquet file has been modified.
# Therefore, only this file needs to be converted to PyArrow; the rest is loaded from the PyArrow memory-mapped cache.
# Explicitly delete old dataset to free memory before reloading
if hasattr(self, 'hf_dataset') and self.hf_dataset is not None:
if hasattr(self, "hf_dataset") and self.hf_dataset is not None:
del self.hf_dataset
self.hf_dataset = None
gc.collect()
self.hf_dataset = self.load_hf_dataset()
metadata = {