Unverified Commit 59937716 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix path for dynamic module creation (#25402)

parent 85447bb2
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment