|
27 | 27 | "max_active_tasks": 10,
|
28 | 28 | }
|
29 | 29 |
|
30 |
| -gsp_forecaster_args = dict( # noqa: C408 |
| 30 | +gsp_forecaster = ContainerDefinition( |
31 | 31 | name="forecast-pvnet",
|
32 | 32 | container_image="ghcr.io/openclimatefix/uk-pvnet-app",
|
33 |
| - container_tag="2.6.18", |
| 33 | + container_tag="2.6.19", |
34 | 34 | container_env={
|
35 | 35 | "LOGLEVEL": "INFO",
|
36 | 36 | "RAISE_MODEL_FAILURE": "critical",
|
37 | 37 | "ALLOW_ADJUSTER": "true",
|
38 | 38 | "ALLOW_SAVE_GSP_SUM": "true",
|
39 |
| - "DAY_AHEAD_MODEL": "false", |
40 | 39 | "SAVE_BATCHES_DIR": f"s3://uk-national-forecaster-models-{env}/pvnet_batches",
|
41 | 40 | "NWP_ECMWF_ZARR_PATH": f"s3://nowcasting-nwp-{env}/ecmwf/data/latest.zarr",
|
42 | 41 | "NWP_UKV_ZARR_PATH": f"s3://nowcasting-nwp-{env}/data-metoffice/latest.zarr",
|
|
51 | 50 | container_cpu=2048,
|
52 | 51 | container_memory=12288,
|
53 | 52 | )
|
54 |
| -gsp_forecaster = ContainerDefinition(**gsp_forecaster_args) |
55 |
| - |
56 | 53 |
|
57 | 54 | national_forecaster = ContainerDefinition(
|
58 | 55 | name="forecast-national",
|
@@ -169,7 +166,6 @@ def gsp_forecast_pvnet_dag() -> None:
|
169 | 166 | container_def=gsp_forecaster,
|
170 | 167 | env_overrides={
|
171 | 168 | "RUN_CRITICAL_MODELS_ONLY": str(env == "production").lower(),
|
172 |
| - "DAY_AHEAD_MODEL": "false", |
173 | 169 | "FILTER_BAD_FORECASTS": str(env == "production").lower(),
|
174 | 170 | },
|
175 | 171 | )
|
@@ -201,48 +197,6 @@ def gsp_forecast_pvnet_dag() -> None:
|
201 | 197 | latest_only_op >> forecast_gsps_op >> [blend_forecasts_op, check_forecasts_op]
|
202 | 198 |
|
203 | 199 |
|
204 |
| -@dag( |
205 |
| - dag_id="uk-forecast-gsp-dayahead", |
206 |
| - description=__doc__, |
207 |
| - schedule="45 * * * *", |
208 |
| - start_date=dt.datetime(2025, 1, 1, tzinfo=dt.UTC), |
209 |
| - catchup=False, |
210 |
| - default_args=default_args, |
211 |
| -) |
212 |
| -def gsp_forecast_pvnet_dayahead_dag() -> None: |
213 |
| - """DAG to forecast GSPs using PVNet.""" |
214 |
| - latest_only_op = LatestOnlyOperator(task_id="latest_only") |
215 |
| - |
216 |
| - forecast_pvnet_day_ahead_op = EcsAutoRegisterRunTaskOperator( |
217 |
| - airflow_task_id="forecast-dayahead-gsps", |
218 |
| - container_def=gsp_forecaster, |
219 |
| - max_active_tis_per_dag=10, |
220 |
| - on_failure_callback=slack_message_callback( |
221 |
| - f"❌🇬🇧 the {get_task_link()} failed. " |
222 |
| - "This would ideally be fixed for da actions at 09.00. " |
223 |
| - "Please see run book for appropriate actions.", |
224 |
| - ), |
225 |
| - env_overrides={ |
226 |
| - "DAY_AHEAD_MODEL": "true", |
227 |
| - "USE_OCF_DATA_SAMPLER": "true", # Note this setting is ignored by the dev image |
228 |
| - "FILTER_BAD_FORECASTS": str(env == "production").lower(), |
229 |
| - }, |
230 |
| - ) |
231 |
| - |
232 |
| - blend_forecasts_op = EcsAutoRegisterRunTaskOperator( |
233 |
| - airflow_task_id="blend-forecasts", |
234 |
| - container_def=forecast_blender, |
235 |
| - max_active_tis_per_dag=10, |
236 |
| - on_failure_callback=slack_message_callback( |
237 |
| - f"❌🇬🇧 The {get_task_link()} failed. " |
238 |
| - "The blending of forecast has failed. " |
239 |
| - "Please see run book for appropriate actions. ", |
240 |
| - ), |
241 |
| - ) |
242 |
| - |
243 |
| - latest_only_op >> forecast_pvnet_day_ahead_op >> blend_forecasts_op |
244 |
| - |
245 |
| - |
246 | 200 | @dag(
|
247 | 201 | dag_id="uk-forecast-national",
|
248 | 202 | description=__doc__,
|
@@ -282,5 +236,4 @@ def national_forecast_dayahead_dag() -> None:
|
282 | 236 |
|
283 | 237 |
|
284 | 238 | gsp_forecast_pvnet_dag()
|
285 |
| -gsp_forecast_pvnet_dayahead_dag() |
286 | 239 | national_forecast_dayahead_dag()
|
0 commit comments