File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,10 @@ def _download_additional_modules(
324
324
local_import_path = os .path .join (local_import_path , sub_directory )
325
325
local_imports .append ((import_name , local_import_path ))
326
326
327
+ return local_imports
328
+
329
+
330
+ def _check_library_imports (name : str , library_imports : List [Tuple [str , str ]]) -> None :
327
331
# Check library imports
328
332
needs_to_be_installed = {}
329
333
for library_import_name , library_import_path in library_imports :
@@ -344,7 +348,6 @@ def _download_additional_modules(
344
348
f"{ ', ' .join (needs_to_be_installed )} .\n Please install { _them_str } using 'pip install "
345
349
f"{ ' ' .join (needs_to_be_installed .values ())} ' for instance."
346
350
)
347
- return local_imports
348
351
349
352
350
353
def _copy_script_and_other_resources_in_importable_dir (
@@ -761,6 +764,7 @@ def get_module(self) -> DatasetModule:
761
764
" repo on your local machine. Make sure you have read the code there to avoid malicious use, then"
762
765
" set the option `trust_remote_code=True` to remove this error."
763
766
)
767
+ _check_library_imports (name = self .name , local_imports = local_imports )
764
768
module_path , hash = _load_importable_file (
765
769
dynamic_modules_path = dynamic_modules_path ,
766
770
module_namespace = "datasets" ,
You can’t perform that action at this time.
0 commit comments