Add huggingface-hub patch for offline snapshot_download with local_dir

This commit is contained in:
Simon Alibert 2024-10-11 11:03:11 +02:00
parent 6d2bc11365
commit 7f680886b0
3 changed files with 824 additions and 692 deletions

View File

@ -178,9 +178,6 @@ class LeRobotDataset(torch.utils.data.Dataset):
will only download those episodes (selected by their episode_index). If 'episodes' is None, the whole will only download those episodes (selected by their episode_index). If 'episodes' is None, the whole
dataset will be downloaded. Thanks to the behavior of snapshot_download, if the files are already present dataset will be downloaded. Thanks to the behavior of snapshot_download, if the files are already present
in 'local_dir', they won't be downloaded again. in 'local_dir', they won't be downloaded again.
Note: Currently, if you're running this code offline but you already have the files in 'local_dir',
snapshot_download will still fail. This behavior will be fixed in an upcoming update of huggingface_hub.
""" """
# TODO(rcadene, aliberts): implement faster transfer # TODO(rcadene, aliberts): implement faster transfer
# https://huggingface.co/docs/huggingface_hub/en/guides/download#faster-downloads # https://huggingface.co/docs/huggingface_hub/en/guides/download#faster-downloads

1511
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@ opencv-python = ">=4.9.0"
diffusers = ">=0.27.2" diffusers = ">=0.27.2"
torchvision = ">=0.17.1" torchvision = ">=0.17.1"
h5py = ">=3.10.0" h5py = ">=3.10.0"
huggingface-hub = {extras = ["hf-transfer", "cli"], version = ">=0.25.0"} huggingface-hub = {extras = ["hf-transfer", "cli"], version = ">=0.25.2"}
gymnasium = ">=0.29.1" gymnasium = ">=0.29.1"
cmake = ">=3.29.0.1" cmake = ">=3.29.0.1"
gym-dora = { git = "https://github.com/dora-rs/dora-lerobot.git", subdirectory = "gym_dora", optional = true } gym-dora = { git = "https://github.com/dora-rs/dora-lerobot.git", subdirectory = "gym_dora", optional = true }