mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
Fix path for dynamic module creation (#25402)
This commit is contained in:
parent
85447bb22e
commit
599377161b
@ -59,7 +59,7 @@ def create_dynamic_module(name: Union[str, os.PathLike]):
|
||||
Creates a dynamic module in the cache directory for modules.
|
||||
"""
|
||||
init_hf_modules()
|
||||
dynamic_module_path = Path(HF_MODULES_CACHE) / name
|
||||
dynamic_module_path = (Path(HF_MODULES_CACHE) / name).resolve()
|
||||
# If the parent module does not exist yet, recursively create it.
|
||||
if not dynamic_module_path.parent.exists():
|
||||
create_dynamic_module(dynamic_module_path.parent)
|
||||
|
Loading…
Reference in New Issue
Block a user