update for 4 hour rain forecast

This commit is contained in:
2026-04-06 18:32:33 +10:00
parent fb50c8ed71
commit 3a7309b2cf
20 changed files with 716 additions and 132 deletions
+11 -2
View File
@@ -40,6 +40,7 @@ def read_env_bool(name: str, default: bool) -> bool:
class WorkerConfig:
database_url: str
site: str
horizon_hours: int
model_name: str
model_version_base: str
model_family: str
@@ -166,6 +167,8 @@ def run_training_cycle(cfg: WorkerConfig, env: dict[str, str]) -> None:
start,
"--end",
end,
"--horizon-hours",
str(cfg.horizon_hours),
"--feature-set",
cfg.feature_set,
"--forecast-model",
@@ -185,6 +188,8 @@ def run_training_cycle(cfg: WorkerConfig, env: dict[str, str]) -> None:
start,
"--end",
end,
"--horizon-hours",
str(cfg.horizon_hours),
"--train-ratio",
str(cfg.train_ratio),
"--val-ratio",
@@ -269,6 +274,8 @@ def run_predict_once(cfg: WorkerConfig, env: dict[str, str]) -> None:
str(cfg.model_path),
"--model-name",
cfg.model_name,
"--horizon-hours",
str(cfg.horizon_hours),
"--forecast-model",
cfg.forecast_model,
*(["--allow-empty"] if cfg.allow_empty_data else ["--strict-source-data"]),
@@ -289,8 +296,9 @@ def load_config() -> WorkerConfig:
return WorkerConfig(
database_url=database_url,
site=read_env("RAIN_SITE", "home"),
model_name=read_env("RAIN_MODEL_NAME", "rain_next_1h"),
model_version_base=read_env("RAIN_MODEL_VERSION_BASE", "rain-auto-v1-extended"),
horizon_hours=read_env_int("RAIN_HORIZON_HOURS", 4),
model_name=read_env("RAIN_MODEL_NAME", "rain_next_4h"),
model_version_base=read_env("RAIN_MODEL_VERSION_BASE", "rain-auto-v2-extended-4h"),
model_family=read_env("RAIN_MODEL_FAMILY", "auto"),
feature_set=read_env("RAIN_FEATURE_SET", "extended"),
forecast_model=read_env("RAIN_FORECAST_MODEL", "ecmwf"),
@@ -338,6 +346,7 @@ def main() -> int:
print(
"[rain-ml] worker start "
f"site={cfg.site} "
f"horizon_hours={cfg.horizon_hours} "
f"model_name={cfg.model_name} "
f"model_family={cfg.model_family} "
f"feature_set={cfg.feature_set} "