MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / debug

Method debug

trinity/explorer/workflow_runner.py:487–514  ·  view source on GitHub ↗

Run the debug workflow.

(self)

Source from the content-addressed store, hash-verified

485 )
486
487 async def debug(self) -> None:
488 """Run the debug workflow."""
489 tasks = await self.taskset.read(batch_size=1)
490 task = tasks[0]
491 self.logger.info(f"Start debugging task:\n{task.raw_task}")
492 if not self.enable_profiling:
493 status, exp_payload = await self.run_task(
494 task=task, batch_id="debug", repeat_times=1, run_id_base=0
495 )
496 else:
497 from viztracer import VizTracer
498
499 with VizTracer(output_file=self.output_profiling_file):
500 status, exp_payload = await self.run_task(
501 task=task, batch_id="debug", repeat_times=1, run_id_base=0
502 )
503 experiences = Experience.deserialize_many(exp_payload) if exp_payload else []
504 if not status.ok and not experiences:
505 experiences = self.model_wrapper.extract_experience_from_history()
506 self.logger.info(
507 f"Debugging failed, extracting {len(experiences)} experiences from history."
508 )
509 await self.sqlite_writer.write(experiences)
510 if status.ok:
511 print(f"Task {task.task_id} completed successfully with metrics:\n{status.metrics}")
512 else:
513 self.logger.error(f"Task {task.task_id} failed with message: {status.message}")
514 self.logger.info("Debugging completed.")

Callers 15

debugFunction · 0.95
explore_stepMethod · 0.80
task_done_callbackMethod · 0.80
__init__Method · 0.80
build_diff_estimatorMethod · 0.80
get_indicesMethod · 0.80
__init__Method · 0.80
updateMethod · 0.80
runMethod · 0.80
run_asyncMethod · 0.80

Calls 5

run_taskMethod · 0.80
deserialize_manyMethod · 0.80
readMethod · 0.45
writeMethod · 0.45

Tested by 8

log_outside_actorFunction · 0.64
__init__Method · 0.64
__init__Method · 0.64
__init__Method · 0.64
__init__Method · 0.64
log_infoMethod · 0.64
test_no_actor_logMethod · 0.64
run_asyncMethod · 0.64