File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,10 @@ def _download_additional_modules(
336
336
local_import_path = os .path .join (local_import_path , sub_directory )
337
337
local_imports .append ((import_name , local_import_path ))
338
338
339
+ return local_imports
340
+
341
+
342
+ def _check_library_imports (name : str , library_imports : List [Tuple [str , str ]]) -> None :
339
343
# Check library imports
340
344
needs_to_be_installed = {}
341
345
for library_import_name , library_import_path in library_imports :
@@ -356,7 +360,6 @@ def _download_additional_modules(
356
360
f"{ ', ' .join (needs_to_be_installed )} .\n Please install { _them_str } using 'pip install "
357
361
f"{ ' ' .join (needs_to_be_installed .values ())} ' for instance."
358
362
)
359
- return local_imports
360
363
361
364
362
365
def _copy_script_and_other_resources_in_importable_dir (
@@ -977,6 +980,7 @@ def get_module(self) -> DatasetModule:
977
980
" repo on your local machine. Make sure you have read the code there to avoid malicious use, then"
978
981
" set the option `trust_remote_code=True` to remove this error."
979
982
)
983
+ _check_library_imports (name = self .name , local_imports = local_imports )
980
984
module_path , hash = _load_importable_file (
981
985
dynamic_modules_path = dynamic_modules_path ,
982
986
module_namespace = "datasets" ,
You can’t perform that action at this time.
0 commit comments