elastic / elastic/elastic-evals-sdk-python
[kbn-evals] Experiment aborts on any exception
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 0
- Merge medio
- 1g 13h
- PR unite (30g)
- 18
Descrizione
### Summary
The executor has no error handling around evaluator calls. One network blip during a long run kills everything. Already-ingested scores survive, but the rest of the run is lost with no partial result.
### Problem
`executor/client.py:174-180` calls `await evaluator.evaluate(params)` with no try/except. `asyncio.gather` without `return_exceptions=True` means one failure propagates and aborts the whole run.
Kibana evaluators propagate exceptions. The executor has no safety net.
### Fix
Wrap evaluator calls in the executor. Catch exceptions, convert to `EvaluationResult(label="error", explanation=...)`, log at error level, and continue the run.
kbn-evals wraps every evaluator call in try/catch and converts exceptions to a `{status: "error"}` entry without aborting the run. The SDK should mirror that.
### Done when
- [ ] A failed evaluator does not abort other evaluators or the run
- [ ] The failed score is ingested with `label="error"` and an explanation
- [ ] The test `test_kibana_evaluators_propagate_request_errors` is updated to match the new policy
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia da executor/client.py:174-180, dove viene chiamato evaluator.evaluate(params), ed esegui test_kibana_evaluators_propagate_request_errors. Segui il percorso di asyncio.gather e la gestione esistente di EvaluationResult. Il lavoro è completo quando gli errori degli evaluator vengono registrati, acquisiti come label="error" con una spiegazione e non interrompono gli altri evaluator né l'esecuzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 78/100