`Generator` lets `openai.APIStatusError` escape → one HTTP 4xx/5xx call aborts the whole `description_llm` run
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Read src/autointent/generation/_generator.py around _get_structured_output_openai_async and src/autointent/modules/scoring/_description/llm_encoder.py around _process_utterance_async, then compare the fatal-error policy in typesafe.py. Confirm how aiometer.run_all handles per-utterance failures; done means transient failures are retried or degraded without cancelling the batch, while fatal errors stop it with a typed message.
Written by the indexing model from the issue text.
Description
What happens
Generator._get_structured_output_openai_async catches only (ValidationError, ValueError, LengthFinishReasonError) (_generator.py:239), and LLMDescriptionScorer._process_utterance_async catches only RetriesExceededError (llm_encoder.py:214-224). Any openai.APIStatusError (a 4xx the SDK does not retry, or a 408/429/5xx after its 2 built-in retries) and any openai.APIConnectionError therefore propagates out of aiometer.run_all → run_until_complete → Pipeline.fit: the first failed utterance cancels the whole batch and the whole HPO run.
Observed
Darinochka/AutoIntent-experiments#43 (description_llm on openai/gpt-6-astra via OpenRouter, clinc150): OpenRouter answered HTTP 402 in_flight_budget_exhausted on one call, 358/370 calls into the stage. The process crashed, ≈$17.49 of already-made calls produced no result, and the run could only restart from Pipeline.fit (the completed answers were in StructuredOutputCache, but the stage's budget gate then refused the retry). The crash also left two empty cache directories that made every later Generator(...) raise FileNotFoundError until removed by hand — that part is #335.
Proposed
Same policy TypeSafeDescriptionScorer uses in #350 (_is_fatal):
- transient (408, 429, 5xx, connection errors): retry with backoff honouring
Retry-Afterbeyond the SDK's default, then degrade that utterance to a uniform row (asRetriesExceededErroralready does) and keep going; - fatal (401, 403, 404, 422 — and 402 when it is a hard "no credits" stop; OpenRouter's
in_flight_budget_exhausted402 is arguably transient): raise a typed AutoIntent error with a clear message, before more calls are spent; - catch per utterance inside the coroutine handed to
aiometer.run_all, so one failure never cancels the others in flight.
Follow-up from #350.
- Dominant language
- Python
- Stars
- 53
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deeppavlov/AutoIntent
-
`OptimizationConfig.seed` is `PositiveInt` — `seed=0` is rejected while `Pipeline(seed=0)` accepts itPossibly taken @Gambit-Checkmate claimed this 22 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
deeppavlov/AutoIntent#352 ·
-
Extract `BaseAPIDescriptionScorer` shared by `LLMDescriptionScorer` and `TypeSafeDescriptionScorer`Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
deeppavlov/AutoIntent#357 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
deeppavlov/AutoIntent#356 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
deeppavlov/AutoIntent#355 · 1 comment ·
-
`LLMDescriptionScorer` runs cache hits through the `max_per_second` limiter — 10 s per 100 cached utterancesPossibly taken @kayaal34 claimed this 22 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 58/100
deeppavlov/AutoIntent#354 ·
All issues in deeppavlov/AutoIntent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vllm#61131 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kubernetes-client/python#2735 ·
Maintainers usually reply within 1 day
-
desktop help wanted test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
docs pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pydantic/pydantic-ai#10113 ·
Maintainers usually reply within 1 day
-
Tutorial unit test leaks sample data into tutorial doctestPossibly taken @Gambit-Checkmate claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100