Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion eval_protocol/pytest/default_single_turn_rollout_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __call__(self, rows: List[EvaluationRow], config: RolloutProcessorConfig) ->
async def process_row(row: EvaluationRow) -> EvaluationRow:
"""Process a single row asynchronously."""
start_time = time.perf_counter()

if len(row.messages) == 0:
raise ValueError("Messages is empty. Please provide a non-empty dataset")

Expand Down Expand Up @@ -97,7 +97,10 @@ async def process_row(row: EvaluationRow) -> EvaluationRow:
chunks.append(chunk)
response = litellm.stream_chunk_builder(chunks, messages_payload)
else:
tc = time.perf_counter()
# print(f"run_id {row.execution_metadata.run_id} request_params: {json.dumps(request_params)}")
response = await acompletion(**request_params)
print(f"run_id {row.execution_metadata.run_id} time taken: {time.perf_counter() - tc} speculation_enabled: {request_params.get('extra_body', {}).get('prediction', None) is not None}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Debug print statement left in production code

A debug print statement was left in the production code path. This prints timing information and speculation status for every non-streaming LLM completion call, which will pollute logs and stdout in production. The timing variable tc and the uncommented print at line 103 appear to be debugging/profiling code that wasn't removed before committing.

Fix in Cursor Fix in Web


assert response is not None, "Response is None"
assert isinstance(response, ModelResponse), "Response should be ModelResponse"
Expand Down
Loading
Loading