Datasets:
Download scripts/run_continue.py from tjtrans/Traffic-Demand-Bench: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/datasets/tjtrans/Traffic-Demand-Bench/resolve/main/scripts/run_continue.py
- Command line
-
hf download hf://datasets/tjtrans/Traffic-Demand-Bench/scripts/run_continue.py
-
curl -L -o run_continue.py https://huggingface.co/datasets/tjtrans/Traffic-Demand-Bench/resolve/main/scripts/run_continue.py
3.12 kB
| """Relaunch leftover campaign jobs. One CSV per process. No TimeFilter.""" | |
| from __future__ import annotations | |
| import os | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| PY = sys.executable | |
| LOG = ROOT / "results" / "logs" | |
| CITIES = "NYCBIKE,NYCTAXI,CHIBIKE,CHITAXI,BAYBIKE,BOSBIKE,TORBIKE" | |
| JOBS = [ | |
| {"name": "fast_4060", "args": [str(ROOT / "scripts" / "run_fast_4060.py")]}, | |
| {"name": "fast_4090", "args": [str(ROOT / "scripts" / "run_fast_4090.py")]}, | |
| { | |
| "name": "fill_pdformer_4090", | |
| "args": [ | |
| "-u", "run.py", "--mode", "train", "--models", "PDFormer", | |
| "--datasets", CITIES, "--horizons", "1h,1d,3d", | |
| "--lookbacks", "1d", "--setting", "A", "--seed", "2026", | |
| "--device", "cuda:1", "--epochs", "0", "--out", "pdformer_A_2026", | |
| ], | |
| }, | |
| { | |
| "name": "fill_unist_4090", | |
| "args": [ | |
| "-u", "run.py", "--mode", "train", "--models", "UniST", | |
| "--datasets", CITIES, "--horizons", "1h,1d,3d", | |
| "--lookbacks", "1d", "--setting", "A", "--seed", "2026", | |
| "--device", "cuda:1", "--epochs", "0", "--out", "unist_A_2026", | |
| ], | |
| }, | |
| { | |
| "name": "fill_timesfm_4090", | |
| "args": [ | |
| "-u", "run.py", "--mode", "zero-shot", "--models", "TimesFM-3", | |
| "--datasets", CITIES, "--horizons", "1h,1d,3d", | |
| "--setting", "A", "--seed", "2026", | |
| "--device", "cuda:1", "--node-batch", "16", | |
| "--out", "timesfm3_A_2026", | |
| ], | |
| }, | |
| { | |
| "name": "fill_patchtst_4060", | |
| "args": [ | |
| "-u", "run.py", "--mode", "train", "--models", "PatchTST", | |
| "--datasets", CITIES, "--horizons", "1h,1d,3d", | |
| "--lookbacks", "256", "--setting", "A", "--seed", "2026", | |
| "--device", "cuda:0", "--epochs", "0", "--out", "patchtst_A_2026", | |
| ], | |
| }, | |
| { | |
| "name": "fill_timesnet_4060", | |
| "args": [ | |
| "-u", "run.py", "--mode", "train", "--models", "TimesNet", | |
| "--datasets", CITIES, "--horizons", "1h,1d,3d", | |
| "--lookbacks", "256", "--setting", "A", "--seed", "2026", | |
| "--device", "cuda:0", "--epochs", "0", "--out", "timesnet_A_2026", | |
| ], | |
| }, | |
| ] | |
| def main() -> None: | |
| os.chdir(ROOT) | |
| LOG.mkdir(parents=True, exist_ok=True) | |
| for stale in (ROOT / "results" / "stnn").glob("*.pid"): | |
| stale.unlink(missing_ok=True) | |
| env = os.environ.copy() | |
| env["PYTHONUNBUFFERED"] = "1" | |
| env.setdefault("HF_ENDPOINT", "https://hf-mirror.com") | |
| env["HF_HUB_ENABLE_HF_TRANSFER"] = "0" | |
| env["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" | |
| for job in JOBS: | |
| log = LOG / f"{job['name']}.log" | |
| err = LOG / f"{job['name']}.err" | |
| cmd = [PY, *job["args"]] | |
| print("start", " ".join(cmd), flush=True) | |
| subprocess.Popen( | |
| cmd, | |
| cwd=str(ROOT), | |
| env=env, | |
| stdout=log.open("w", encoding="utf-8"), | |
| stderr=err.open("w", encoding="utf-8"), | |
| ) | |
| if __name__ == "__main__": | |
| main() | |