Skip to content

Commit 2f7b418

Browse files
authored
fix: evals logs as debug (#1401)
1 parent 060117e commit 2f7b418

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

src/uipath/eval/runtime/runtime.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def __init__(
226226
f"eval_set_run_id={context.eval_set_run_id}"
227227
)
228228
self.execution_id = context.execution_id
229-
logger.info(f"EVAL RUNTIME: execution_id set to: {self.execution_id}")
229+
logger.debug(f"EVAL RUNTIME: execution_id set to: {self.execution_id}")
230230
self.coverage = coverage.Coverage(branch=True)
231231

232232
self._storage: UiPathRuntimeStorageProtocol | None = None
@@ -304,12 +304,12 @@ async def initiate_evaluation(
304304

305305
async def execute(self) -> UiPathRuntimeResult:
306306
"""Execute the evaluation runtime."""
307-
logger.info("=" * 80)
308-
logger.info("EVAL RUNTIME: Starting evaluation execution")
309-
logger.info(f"EVAL RUNTIME: Execution ID: {self.execution_id}")
310-
logger.info(f"EVAL RUNTIME: Job ID: {self.context.job_id}")
311-
logger.info(f"EVAL RUNTIME: Resume mode: {self.context.resume}")
312-
logger.info("=" * 80)
307+
logger.debug("=" * 80)
308+
logger.debug("EVAL RUNTIME: Starting evaluation execution")
309+
logger.debug(f"EVAL RUNTIME: Execution ID: {self.execution_id}")
310+
logger.debug(f"EVAL RUNTIME: Job ID: {self.context.job_id}")
311+
logger.debug(f"EVAL RUNTIME: Resume mode: {self.context.resume}")
312+
logger.debug("=" * 80)
313313

314314
with self._mocker_cache():
315315
tracer = self.trace_manager.tracer_provider.get_tracer(__name__)
@@ -396,8 +396,8 @@ async def execute(self) -> UiPathRuntimeResult:
396396
)
397397

398398
# Collect triggers from all evaluation runs (pass-through from inner runtime)
399-
logger.info("=" * 80)
400-
logger.info(
399+
logger.debug("=" * 80)
400+
logger.debug(
401401
"EVAL RUNTIME: Collecting triggers from all evaluation runs"
402402
)
403403
all_triggers = []
@@ -413,16 +413,16 @@ async def execute(self) -> UiPathRuntimeResult:
413413
all_triggers.extend(runtime_result.triggers)
414414

415415
if all_triggers:
416-
logger.info(
416+
logger.debug(
417417
f"EVAL RUNTIME: ✅ Passing through {len(all_triggers)} trigger(s) to top-level result"
418418
)
419419
for i, trigger in enumerate(all_triggers, 1):
420-
logger.info(
420+
logger.debug(
421421
f"EVAL RUNTIME: Pass-through trigger {i}: {trigger.model_dump(by_alias=True)}"
422422
)
423423
else:
424-
logger.info("EVAL RUNTIME: No triggers to pass through")
425-
logger.info("=" * 80)
424+
logger.debug("EVAL RUNTIME: No triggers to pass through")
425+
logger.debug("=" * 80)
426426

427427
# Determine overall status - propagate status from inner runtime
428428
# This is critical for serverless executor to know to save state and suspend job
@@ -438,7 +438,7 @@ async def execute(self) -> UiPathRuntimeResult:
438438
)
439439
if inner_status == UiPathRuntimeStatus.SUSPENDED:
440440
overall_status = UiPathRuntimeStatus.SUSPENDED
441-
logger.info(
441+
logger.debug(
442442
"EVAL RUNTIME: Propagating SUSPENDED status from inner runtime"
443443
)
444444
break # SUSPENDED takes highest priority, stop checking
@@ -534,10 +534,10 @@ async def _execute_eval(
534534
eval_set_run_id=self.context.eval_set_run_id,
535535
)
536536

537-
logger.info(
537+
logger.debug(
538538
f"DEBUG: Agent execution result status: {agent_execution_output.result.status}"
539539
)
540-
logger.info(
540+
logger.debug(
541541
f"DEBUG: Agent execution result trigger: {agent_execution_output.result.trigger}"
542542
)
543543

@@ -583,11 +583,11 @@ async def _execute_eval(
583583
):
584584
# For suspended executions, we don't run evaluators yet
585585
# The serverless executor should save the triggers and resume later
586-
logger.info("=" * 80)
587-
logger.info(
586+
logger.debug("=" * 80)
587+
logger.debug(
588588
f"🔴 EVAL RUNTIME: DETECTED SUSPENSION for eval '{eval_item.name}' (id: {eval_item.id})"
589589
)
590-
logger.info("EVAL RUNTIME: Agent returned SUSPENDED status")
590+
logger.debug("EVAL RUNTIME: Agent returned SUSPENDED status")
591591

592592
# Extract triggers from result
593593
triggers = []
@@ -596,15 +596,15 @@ async def _execute_eval(
596596
if agent_execution_output.result.triggers:
597597
triggers.extend(agent_execution_output.result.triggers)
598598

599-
logger.info(
599+
logger.debug(
600600
f"EVAL RUNTIME: Extracted {len(triggers)} trigger(s) from suspended execution"
601601
)
602602
for i, trigger in enumerate(triggers, 1):
603-
logger.info(
603+
logger.debug(
604604
f"EVAL RUNTIME: Trigger {i}: {trigger.model_dump(by_alias=True)}"
605605
)
606606

607-
logger.info("=" * 80)
607+
logger.debug("=" * 80)
608608

609609
# IMPORTANT: Always include execution output with triggers when suspended
610610
# This ensures triggers are visible in the output JSON for serverless executor
@@ -618,7 +618,7 @@ async def _execute_eval(
618618
# The evalRun should remain in IN_PROGRESS state until the agent completes
619619
# and evaluators run. When the execution resumes, the evaluators will run
620620
# and the evalRun will be properly updated with results.
621-
logger.info(
621+
logger.debug(
622622
"EVAL RUNTIME: Skipping evalRun update - keeping status as IN_PROGRESS until resume"
623623
)
624624

@@ -862,7 +862,7 @@ async def execute_runtime(
862862
# 3. Build resume map: {interrupt_id: resume_data}
863863
# 4. Pass this map to the delegate runtime
864864
if self.context.resume:
865-
logger.info(f"Resuming evaluation {eval_item.id}")
865+
logger.debug(f"Resuming evaluation {eval_item.id}")
866866
input = input_overrides if self.context.job_id is None else None
867867
else:
868868
input = inputs_with_overrides
@@ -876,7 +876,7 @@ async def execute_runtime(
876876

877877
# Log suspend status if applicable
878878
if result.status == UiPathRuntimeStatus.SUSPENDED:
879-
logger.info(f"Evaluation {eval_item.id} suspended")
879+
logger.debug(f"Evaluation {eval_item.id} suspended")
880880

881881
except Exception as e:
882882
end_time = time()
@@ -1042,7 +1042,7 @@ async def _restore_parent_span(
10421042
trace_flags=TraceFlags(0x01), # Sampled
10431043
)
10441044
parent_span = NonRecordingSpan(span_context)
1045-
logger.info(
1045+
logger.debug(
10461046
f"EVAL RUNTIME: Restored {span_type} span context for resume - "
10471047
f"trace_id={saved_context['trace_id']}, span_id={saved_context['span_id']}"
10481048
)
@@ -1083,7 +1083,7 @@ async def _save_span_context_for_resume(
10831083
},
10841084
)
10851085

1086-
logger.info(
1086+
logger.debug(
10871087
f"EVAL RUNTIME: Saved {span_type} span context for resume - "
10881088
f"trace_id={trace_id_hex}, span_id={span_id_hex}"
10891089
)

0 commit comments

Comments
 (0)