Spaces:
Sleeping
Sleeping
Jompatron commited on
Commit ·
fbf6b81
1
Parent(s): 813a5c6
new models
Browse files
app.py
CHANGED
|
@@ -152,6 +152,8 @@ def generate_forecast(sensor_internal: str, days: int) -> str | None:
|
|
| 152 |
# Future weather (city-level, same for all sensors)
|
| 153 |
df_future = weather_fg.read().sort_values("date")
|
| 154 |
df_future["date"] = pd.to_datetime(df_future["date"]).dt.date
|
|
|
|
|
|
|
| 155 |
|
| 156 |
# PM2.5 history for this sensor
|
| 157 |
aq_fg = project.get_feature_store().get_feature_group("dundee_air_quality", version=1)
|
|
@@ -177,7 +179,7 @@ def generate_forecast(sensor_internal: str, days: int) -> str | None:
|
|
| 177 |
target_date = today + timedelta(days=offset)
|
| 178 |
row = df_future[df_future["date"] == target_date]
|
| 179 |
if len(row) == 0:
|
| 180 |
-
|
| 181 |
continue
|
| 182 |
|
| 183 |
lag1, lag2, lag3 = pm25_history[-1], pm25_history[-2], pm25_history[-3]
|
|
|
|
| 152 |
# Future weather (city-level, same for all sensors)
|
| 153 |
df_future = weather_fg.read().sort_values("date")
|
| 154 |
df_future["date"] = pd.to_datetime(df_future["date"]).dt.date
|
| 155 |
+
print("DEBUG: WEATHER FUTURE DATES:", df_future["date"].tail(15).tolist())
|
| 156 |
+
print("DEBUG: Today:", today)
|
| 157 |
|
| 158 |
# PM2.5 history for this sensor
|
| 159 |
aq_fg = project.get_feature_store().get_feature_group("dundee_air_quality", version=1)
|
|
|
|
| 179 |
target_date = today + timedelta(days=offset)
|
| 180 |
row = df_future[df_future["date"] == target_date]
|
| 181 |
if len(row) == 0:
|
| 182 |
+
print("DEBUG: Missing weather data for:", target_date)
|
| 183 |
continue
|
| 184 |
|
| 185 |
lag1, lag2, lag3 = pm25_history[-1], pm25_history[-2], pm25_history[-3]
|