Download accesspath.py from anonymous-accesspath/AccessPath: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/anonymous-accesspath/AccessPath/resolve/2f382c4d21c549846fb89f3ba8ec5e40206dadc1/accesspath.py
- Command line
-
hf download hf://anonymous-accesspath/AccessPath@2f382c4d21c549846fb89f3ba8ec5e40206dadc1/accesspath.py
-
curl -L -o accesspath.py https://huggingface.co/anonymous-accesspath/AccessPath/resolve/2f382c4d21c549846fb89f3ba8ec5e40206dadc1/accesspath.py
1.3 kB
| #!/usr/bin/env python3 | |
| """AccessPath command-line entry point for the full 2D/3D pipeline.""" | |
| from __future__ import annotations | |
| import argparse | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent | |
| TOOLS = { | |
| "2d": ROOT / "tools" / "accessibility_2d_completion.py", | |
| "3d": ROOT / "tools" / "accessibility_3d_completion.py", | |
| } | |
| def main() -> int: | |
| parser = argparse.ArgumentParser( | |
| description="Run the AccessPath pipeline or one of its completion backends." | |
| ) | |
| parser.add_argument( | |
| "mode", | |
| choices=("pipeline", *TOOLS), | |
| help="Full Slurm pipeline, or a direct 2D/3D backend.", | |
| ) | |
| parser.add_argument( | |
| "args", | |
| nargs=argparse.REMAINDER, | |
| help="Arguments forwarded to the selected backend; prefix them with --.", | |
| ) | |
| parsed = parser.parse_args() | |
| forwarded = parsed.args[1:] if parsed.args[:1] == ["--"] else parsed.args | |
| if parsed.mode == "pipeline": | |
| from accesspath3r.cli import main as pipeline_main | |
| sys.argv = [str(ROOT / "accesspath.py"), *forwarded] | |
| return pipeline_main() | |
| return subprocess.run([sys.executable, str(TOOLS[parsed.mode]), *forwarded], check=False).returncode | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |