elastic / elastic/elastic-evals-sdk-python
[kbn-evals] Evaluator discovery and preflight validation
- Vorherrschende Sprache
- Python
- Sterne
- 2
- Forks
- 0
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
### Summary
A typo in an evaluator name (`KibanaEvaluatorConfig(name="corectness")`) only surfaces at scoring time as `label="error"`, after the task has already run. Two methods for discovery and validation already exist in the API client but are wired to nothing.
### Problem
- `api/evaluators_client.py:48`: `list_evaluators()` exists but is not called in production code
- `api/evaluators_client.py:62`: `validate()` exists but is not called in production code
- `KibanaEvaluatorConfig.name` is a plain `str` with no validation; even an empty string is accepted
- No CLI command exists to list Kibana evaluators (a command does exist to list suites)
### Fix
- Validate evaluator names before the run starts using `list_evaluators()` or `validate()`
- Add an `elastic-evals list-evaluators` CLI command
- Wire this into the named classmethod approach (see #36)
### Done when
- [ ] A misspelt evaluator name raises a clear error before any task runs
- [ ] `elastic-evals list-evaluators` prints the evaluators available in Kibana
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit api/evaluators_client.py bei list_evaluators() und validate(), und untersuche dann KibanaEvaluatorConfig.name sowie den bestehenden CLI-Befehl zum Auflisten von Suites. Verfolge den in #36 erwähnten Ansatz mit einer benannten classmethod. Fertig bedeutet, dass ungültige Evaluator-Namen fehlschlagen, bevor Tasks ausgeführt werden, und dass elastic-evals list-evaluators die in Kibana verfügbaren Evaluatoren ausgibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, cli
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 58/100