|
63 | 63 | domain="india", |
64 | 64 | ) |
65 | 65 |
|
| 66 | +ruvnl_forecaster_v2 = ContainerDefinition( |
| 67 | + name="forecast-ruvnl", |
| 68 | + container_image="ghcr.io/openclimatefix/site-forecast-app", |
| 69 | + container_tag="add-gencast-support" if env=="development" else "1.2.0", |
| 70 | + container_env={ |
| 71 | + "NWP_MO_GLOBAL_ZARR_PATH": f"s3://india-nwp-{env}/metoffice/data/latest.zarr", |
| 72 | + "NWP_ECMWF_ZARR_PATH": f"s3://india-nwp-{env}/ecmwf/data/latest.zarr", |
| 73 | + "SATELLITE_ZARR_PATH": f"s3://india-satellite-{env}/iodc/data/latest.zarr.zip", |
| 74 | + "NWP_GENCAST_GCS_BUCKET_PATH": "gs://weathernext/126478713_1_0/zarr/126478713_2024_to_present/", |
| 75 | + "NWP_GENCAST_ZARR_PATH": "/tmp/nwp_gencast_out.zarr", |
| 76 | + "CLIENT_NAME": "ruvnl", |
| 77 | + "COUNTRY": "india", |
| 78 | + }, |
| 79 | + container_secret_env={ |
| 80 | + f"{env}/rds/indiadb": ["DB_URL"], |
| 81 | + f"{env}/huggingface/token": ["HUGGINGFACE_TOKEN"], |
| 82 | + # TODO add gcs credentials secrets here or need to mount a volume? |
| 83 | + }, |
| 84 | + container_cpu=1024, |
| 85 | + container_memory=3072, |
| 86 | + domain="india", |
| 87 | +) |
| 88 | + |
66 | 89 | @dag( |
67 | 90 | dag_id="india-forecast-ruvnl", |
68 | 91 | description=__doc__, |
@@ -136,6 +159,34 @@ def ad_forecast_dag() -> None: |
136 | 159 |
|
137 | 160 | latest_only_op >> [forecast_ad_op, forecast_ad_v2_op] |
138 | 161 |
|
| 162 | +@dag( |
| 163 | + dag_id="india-forecast-ruvnl-v2", |
| 164 | + description=__doc__, |
| 165 | + schedule="0 * * * *", |
| 166 | + start_date=dt.datetime(2026, 1, 1, tzinfo=dt.UTC), |
| 167 | + catchup=False, |
| 168 | + default_args=default_args, |
| 169 | +) |
| 170 | +def ruvnl_forecast_v2_dag() -> None: |
| 171 | + """Create RUVNL forecasts.""" |
| 172 | + latest_only_op = LatestOnlyOperator(task_id="latest_only") |
| 173 | + |
| 174 | + forecast_ruvnl_v2_op = EcsAutoRegisterRunTaskOperator( |
| 175 | + airflow_task_id="forecast-ruvnl", |
| 176 | + container_def=ruvnl_forecaster_v2, |
| 177 | + env_overrides={ |
| 178 | + "CLIENT_NAME": "ruvnl", |
| 179 | + "USE_SATELLITE": "False", |
| 180 | + # TODO check if this is acyually used |
| 181 | + "SAVE_BATCHES_DIR": f"s3://india-forecast-{env}/RUVNL-v2", |
| 182 | + }, |
| 183 | + on_failure_callback=get_slack_message_callback(country="in", urgency=Urgency.SUBCRITICAL), |
| 184 | + max_active_tis_per_dag=10, |
| 185 | + ) |
| 186 | + |
| 187 | + latest_only_op >> forecast_ruvnl_v2_op |
| 188 | + |
139 | 189 |
|
140 | 190 | ruvnl_forecast_dag() |
141 | 191 | ad_forecast_dag() |
| 192 | +ruvnl_forecast_v2_dag() |
0 commit comments