Datasets:
Download code/dynamic_dataset/runtime.py from Heiheihaha17/MESH-Benchmark: direct link, hf CLI and curl.
- Browser
- Download file 418 Bytes
-
https://huggingface.co/datasets/Heiheihaha17/MESH-Benchmark/resolve/main/code/dynamic_dataset/runtime.py
- Command line
-
hf download hf://datasets/Heiheihaha17/MESH-Benchmark/code/dynamic_dataset/runtime.py
-
curl -L -o runtime.py https://huggingface.co/datasets/Heiheihaha17/MESH-Benchmark/resolve/main/code/dynamic_dataset/runtime.py
418 Bytes
| """Compute guard: allocated cluster jobs or explicitly enabled local reproduction.""" | |
| import os,socket | |
| def ensure_compute(): | |
| if os.environ.get('DISH_ALLOW_LOCAL_RENDER')=='1':return | |
| if 'debug' not in socket.gethostname().lower() and os.environ.get('KUBERNETES_SERVICE_HOST'):return | |
| raise RuntimeError('Use an allocated CPU job; on your own reproduction machine explicitly set DISH_ALLOW_LOCAL_RENDER=1') | |