Working style¶
The conventions below are duplicated in
CLAUDE.md,
which is the source of truth for agent-driven contributions.
Environment¶
- Python 3.12, managed with
uv. Install withuv sync --no-cache. - Run every script via
uv run python -m <module>. Neverpip install. - PyTorch + PyTorch-Geometric assume CUDA is available; there is no CPU fallback path.
Entry points¶
Executable modules live in swissrivernetwork/benchmark/:
data_preparation.py— dataset build.ray_tune.py— hyperparameter search.ray_evaluation.py— test-time evaluation.train_single_model.py— single unified model.train_isolated_station.py— per-station models.run_win_len_sweep.py— window-length sweep.
Gotchas¶
RAY_CHDIR_TO_TRIAL_DIR=0is set insideray_tune.pyon purpose — Ray otherwise changes the working directory per trial and breaks relative paths. Do not remove.- Weights & Biases needs
WANDB_API_KEY. If you don't have one, setWANDB_MODE=disabledrather than stripping the code. swissrivernetwork/benchmark/outputs/ray_results/can hold hundreds of subdirectories — never list it unfiltered. Useoutputs/trim_checkpoints.pyto prune.
Commit style¶
Conventional Commits. Good: feat(app): add Streamlit compare tab.
Bad: update, fix stuff, wip.
No test suite¶
Verify changes by running the relevant entry point, not by inventing tests. CI will grow a real test suite over time; today it runs ruff and a handful of notebook executions.