Spaces:
Running
Running
| """Unified timing for the live benchmark loop.""" | |
| from __future__ import annotations | |
| import os | |
| # One full cycle: TS-Bench collect β TSFM.ai eval β write results β leaderboard reload. | |
| BENCHMARK_INTERVAL_SECONDS = int( | |
| os.getenv( | |
| "TSFM_BENCH_INTERVAL_SECONDS", | |
| os.getenv("TSFM_EVAL_INTERVAL_SECONDS", "3600"), | |
| ) | |
| ) | |
| # Background poll interval: detect eval completion and refresh UI once (not shown to users). | |
| EVAL_WATCH_POLL_SECONDS = int(os.getenv("TSFM_EVAL_WATCH_POLL_SECONDS", "15")) | |
| # When false (default), the Space only displays pushed results β no API calls on startup. | |
| LIVE_EVAL_ENABLED = os.getenv("TSFM_LIVE_EVAL", "0").strip().lower() in {"1", "true", "yes", "on"} | |
| BENCHMARK_INTERVAL_MINUTES = BENCHMARK_INTERVAL_SECONDS // 60 | |