Spaces:
Sleeping
Sleeping
Download _aliases.py from Viraj0112/rl_code_fix_env: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/Viraj0112/rl_code_fix_env/resolve/main/_aliases.py
- Command line
-
hf download hf://spaces/Viraj0112/rl_code_fix_env/_aliases.py
-
curl -L -o _aliases.py https://huggingface.co/spaces/Viraj0112/rl_code_fix_env/resolve/main/_aliases.py
552 Bytes
| import sys | |
| import importlib | |
| from pathlib import Path | |
| _REPO_ROOT = str(Path(__file__).parent) | |
| if _REPO_ROOT not in sys.path: | |
| sys.path.insert(0, _REPO_ROOT) | |
| import dataset as _real_dataset | |
| sys.modules.setdefault("src.dataset", _real_dataset) | |
| import pkgutil | |
| for _pkg in pkgutil.iter_modules(_real_dataset.__path__): | |
| _full = f"dataset.{_pkg.name}" | |
| _alias = f"src.dataset.{_pkg.name}" | |
| try: | |
| _mod = importlib.import_module(_full) | |
| sys.modules.setdefault(_alias, _mod) | |
| except Exception: | |
| pass | |