File tree 3 files changed +8
-0
lines changed
.github/unittest/linux_libs/scripts_roboset 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,4 @@ dependencies:
19
19
- hydra-core
20
20
- huggingface_hub
21
21
- tqdm
22
+ - h5py
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ def _main(argv):
218
218
"tqdm" ,
219
219
"scikit-learn" ,
220
220
"pandas" ,
221
+ "h5py" ,
221
222
],
222
223
"marl" : ["vmas>=1.2.10" , "pettingzoo>=1.24.1" ],
223
224
}
Original file line number Diff line number Diff line change 24
24
from torchrl .data .replay_buffers .writers import Writer
25
25
26
26
_has_tqdm = importlib .util .find_spec ("tqdm" , None ) is not None
27
+ _has_h5py = importlib .util .find_spec ("h5py" , None ) is not None
28
+ _has_hf_hub = importlib .util .find_spec ("huggingface_hub" , None ) is not None
27
29
28
30
_NAME_MATCH = KeyDependentDefaultDict (lambda key : key )
29
31
_NAME_MATCH ["observations" ] = "observation"
@@ -158,6 +160,10 @@ def __init__(
158
160
split_trajs : bool = False ,
159
161
** env_kwargs ,
160
162
):
163
+ if not _has_h5py or not _has_hf_hub :
164
+ raise ImportError (
165
+ "h5py and huggingface_hub are required for Roboset datasets."
166
+ )
161
167
if dataset_id not in self .available_datasets :
162
168
raise ValueError (
163
169
f"The dataset_id { dataset_id } isn't part of the accepted datasets. "
You can’t perform that action at this time.
0 commit comments