Wire the Lottoland fallback into the automated update workflow
AutoUpdateAndLearn.update_data() called LottoAPIUpdater with api_name='github', which skipped the already-implemented Lottoland -> GitHub -> lottoAPI fallback chain entirely. The GitHub archive alone has repeatedly lagged 1-6 days behind actual draws (most recently the Aug 5 draw, still missing as of Aug 7), causing tips to be generated and models to be retrained on stale data. Switching to api_name='all' tries Lottoland first, which has consistently had same-day results in testing, with GitHub still covering full history/fallback. Also includes the Aug 5 draw pulled in via this fix and the resulting model retrain (data update was previously interrupted by a truncated pipe during manual testing, this completes it). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
79c4c0d4b3
commit
a45092b162
7 files changed
+25
-13
No files matched your search
@@ -3147,3 +3147,4 @@ datum;Z1;Z2;Z3;Z4;Z5;Z6;SZ
|
||||
2026-07-25;18;21;31;36;42;44;3
|
||||
2026-07-29;3;16;22;43;48;49;8
|
||||
2026-08-01;19;20;22;25;31;42;8
|
||||
2026-08-05;15;23;24;36;44;49;0
|
||||
|
@@ -857,6 +857,19 @@
|
||||
"main": 0.1,
|
||||
"sz_rate": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-08-07T10:50:43.433684",
|
||||
"draw_date": "2026-08-05",
|
||||
"evaluation": {
|
||||
"main": 1,
|
||||
"sz": true,
|
||||
"tip": 10
|
||||
},
|
||||
"avg_matches": {
|
||||
"main": 0.6,
|
||||
"sz_rate": 0.1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"trained_at": "2026-08-04T17:19:36.241253",
|
||||
"num_samples": 3128,
|
||||
"trained_at": "2026-08-07T10:53:11.352902",
|
||||
"num_samples": 3129,
|
||||
"num_features": 20,
|
||||
"final_loss": 0.37382649620877034,
|
||||
"final_val_loss": 0.3735962837934494,
|
||||
"best_val_loss": 0.37336874306201934,
|
||||
"epochs_trained": 26
|
||||
"final_loss": 0.3726010733767401,
|
||||
"final_val_loss": 0.37349517047405245,
|
||||
"best_val_loss": 0.37338881492614745,
|
||||
"epochs_trained": 30
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -63,7 +63,7 @@ Alle Pfade relativ zum Projekt-Root.
|
||||
|
||||
| Komponente | Datei | Rolle |
|
||||
| --- | --- | --- |
|
||||
| `LottoAPIUpdater` | `scripts/utils/update_from_api.py` | Holt neue Ziehungen. Unterstützt 3 Quellen (Lottoland, GitHub-Archiv, lottoAPI) über `fetch_from_all_apis()`, **aber** `auto_update_and_learn.py` ruft aktuell fest `api_name='github'` auf — Lottoland/lottoAPI-Fallback ist im Code vorhanden, aber nicht verdrahtet (siehe Abschnitt 5). |
|
||||
| `LottoAPIUpdater` | `scripts/utils/update_from_api.py` | Holt neue Ziehungen über `fetch_from_all_apis()`: Lottoland zuerst (liefert die neueste Ziehung meist noch am Ziehungstag), GitHub-Archiv für die Historie/als Fallback (kann tagelang hinterherhinken). `auto_update_and_learn.py` nutzt seit August 2026 `api_name='all'`, davor fest `api_name='github'` — daher wiederholt verspätete Ziehungen in der Vergangenheit. |
|
||||
| `AutoUpdateAndLearn` | `scripts/automation/auto_update_and_learn.py` | Orchestriert den 4-Schritte-Workflow: Daten aktualisieren → neue Ziehung prüfen → letzte Tipps evaluieren → Learning-Update (Retraining). |
|
||||
| `FeatureEngineer` | `scripts/generators/ultimate_ai_ml_hybrid_generator.py` | Baut 20 Features (Frequenzen, Gaps, Momentum, Trends, Beziehungen, Zyklen) aus den Rohdaten. |
|
||||
| `AIMLEngine` | `scripts/generators/ultimate_ai_ml_hybrid_generator.py` | RandomForest-Modelle, ein Modell pro Zahl (1–49). Cached unter `data/ultimate_ml_models/`. |
|
||||
@@ -132,11 +132,6 @@ Logs: `logs/update_stdout.log` (Update+Learning), `logs/stdout.log`
|
||||
|
||||
## 5. Bekannte Schwachstellen / offene Punkte
|
||||
|
||||
- **Ungenutzter Fallback:** `LottoAPIUpdater.fetch_from_all_apis()` unterstützt
|
||||
Lottoland → GitHub → lottoAPI als Fallback-Kette, aber
|
||||
`AutoUpdateAndLearn.update_data()` ruft fest `api_name='github'` auf. Bei
|
||||
Verzögerungen der GitHub-Quelle (schon mehrfach vorgekommen) hinkt die
|
||||
Pipeline entsprechend hinterher, obwohl Lottoland oft schneller aktuell ist.
|
||||
- **`update_from_web.py`** (lotto.de-Scraper) ist als dritter Fallback
|
||||
implementiert, aber nirgends in der automatisierten Pipeline eingebunden.
|
||||
- **Utility-Skripte** in `scripts/utils/` (`health_check.py`, `validate_csv.py`,
|
||||
|
||||
@@ -125,7 +125,10 @@ class AutoUpdateAndLearn:
|
||||
|
||||
try:
|
||||
updater = LottoAPIUpdater(self.data_file)
|
||||
success = updater.update(api_name='github', create_backup=True)
|
||||
# 'all': Lottoland zuerst (liefert die neueste Ziehung meist noch am
|
||||
# Ziehungstag), GitHub-Archiv als Quelle für die Historie/Fallback -
|
||||
# das GitHub-Archiv allein hinkt wiederholt tagelang hinterher.
|
||||
success = updater.update(api_name='all', create_backup=True)
|
||||
|
||||
if success:
|
||||
print(" ✅ Daten erfolgreich aktualisiert")
|
||||
|
||||
Reference in new issue
Block a user