Datasets:
Download scripts/_env_check.py from tjtrans/Traffic-Demand-Bench: direct link, hf CLI and curl.
- Browser
- Download file 803 Bytes
-
https://huggingface.co/datasets/tjtrans/Traffic-Demand-Bench/resolve/main/scripts/_env_check.py
- Command line
-
hf download hf://datasets/tjtrans/Traffic-Demand-Bench/scripts/_env_check.py
-
curl -L -o _env_check.py https://huggingface.co/datasets/tjtrans/Traffic-Demand-Bench/resolve/main/scripts/_env_check.py
803 Bytes
| import importlib | |
| import sys | |
| print("exe", sys.executable) | |
| print("ver", sys.version.replace("\n", " ")) | |
| try: | |
| import torch | |
| print("torch", torch.__version__, "cuda", torch.cuda.is_available(), "n", torch.cuda.device_count()) | |
| for i in range(torch.cuda.device_count()): | |
| print("gpu", i, torch.cuda.get_device_name(i)) | |
| except Exception as e: | |
| print("torch_fail", type(e).__name__, e) | |
| for name in ( | |
| "chronos", | |
| "tirex2", | |
| "yaml", | |
| "pandas", | |
| "numpy", | |
| "transformers", | |
| "accelerate", | |
| "safetensors", | |
| "einops", | |
| "scipy", | |
| "sklearn", | |
| ): | |
| try: | |
| m = importlib.import_module(name) | |
| print("ok", name, getattr(m, "__version__", "?")) | |
| except Exception as e: | |
| print("miss", name, type(e).__name__, e) | |