Skip to content

Commit 156fd72

Browse files
committed
Single llm() failure in llm_batch() should not error out the whole batch (lint)
1 parent dae8490 commit 156fd72

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎rlm/core/lm_handler.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ async def run_all():
127127
prompt=prompt,
128128
response=content,
129129
usage_summary=usage_summary,
130-
execution_time=total_time / len(request.prompts), # approximate per-prompt time
130+
execution_time=total_time
131+
/ len(request.prompts), # approximate per-prompt time
131132
)
132133
)
133134

‎rlm/core/types.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ class RLMChatCompletion:
126126
metadata: dict | None = (
127127
None # Full trajectory (run_metadata + iterations) when logger captures it
128128
)
129-
error: str | None = None # Set when this single call failed (e.g. in a batch); response is empty.
129+
error: str | None = (
130+
None # Set when this single call failed (e.g. in a batch); response is empty.
131+
)
130132

131133
def to_dict(self):
132134
out = {

0 commit comments

Comments
 (0)