Skip to content

fix(db): Record trajectory time cost#266

Open
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/trajectory-time-cost-20260525
Open

fix(db): Record trajectory time cost#266
Gujiassh wants to merge 1 commit into
TencentCloudADP:mainfrom
Gujiassh:fix/trajectory-time-cost-20260525

Conversation

@Gujiassh

Copy link
Copy Markdown

Summary

  • add elapsed-time tracking to TaskRecorder
  • store the recorder's measured time_cost in TrajectoryModel instead of the hardcoded -1
  • add regression coverage for finished and unfinished recorders

Closes #201

Validation

  • UTU_LLM_TYPE=openai UTU_LLM_MODEL=dummy UV_PROJECT_ENVIRONMENT=.venv312 uv run --python python3.12 pytest tests/db/test_trajectory.py -q -k 'trajectory_model_uses_recorder_time_cost or trajectory_model_leaves_unfinished_time_cost_empty'
  • UTU_LLM_TYPE=openai UTU_LLM_MODEL=dummy UV_PROJECT_ENVIRONMENT=.venv312 uv run --python python3.12 ruff check utu/agents/common.py utu/agents/simple_agent.py utu/db/trajectory_model.py tests/db/test_trajectory.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trajectory time_cost always set to -1

1 participant