mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-25 18:56:09 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -317,7 +317,7 @@ class LeRobotDatasetMetadata:
|
||||
# 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()
|
||||
@@ -1061,7 +1061,7 @@ class LeRobotDataset(torch.utils.data.Dataset):
|
||||
# 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()
|
||||
|
||||
Reference in New Issue
Block a user