Merge nucleic/plucky-north-vole-sdna into dev
This commit is contained in:
+6
-3
@@ -166,9 +166,12 @@ def select_candidates(
|
|||||||
):
|
):
|
||||||
funnel["rejectedMalformedOrEmpty"] += 1
|
funnel["rejectedMalformedOrEmpty"] += 1
|
||||||
continue
|
continue
|
||||||
by_session[session_id].append(
|
# Retain only the first three checked ordinals while streaming. This bounds
|
||||||
Turn(session_id, turn_id, conversation_turn_number, turn_number, prompt)
|
# memory by sessions × 3, not by every eligible prompt in the large config.
|
||||||
)
|
turns = by_session[session_id]
|
||||||
|
turns.append(Turn(session_id, turn_id, conversation_turn_number, turn_number, prompt))
|
||||||
|
turns.sort(key=lambda turn: (turn.conversation_turn_number, turn.turn_number, turn.turn_id))
|
||||||
|
del turns[3:]
|
||||||
funnel["eligibleRows"] += 1
|
funnel["eligibleRows"] += 1
|
||||||
|
|
||||||
preliminary: list[Candidate] = []
|
preliminary: list[Candidate] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user