- Remove unused imports (json, datetime, timedelta, Any, Optional, IntelligentEval) - Remove unused variable (estimated_sessions) - Remove whitespace from blank line - Organize import blocks All ruff checks passing.
This commit is contained in:
parent
617cc3909d
commit
4e9145db46
@ -10,13 +10,12 @@ Notifications:
|
||||
- Optional webhook notifications
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any, Optional
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
import httpx
|
||||
from sqlmodel import Session, SQLModel, Field, select
|
||||
from sqlmodel import Field, Session, SQLModel, select
|
||||
|
||||
from agenteval.intelligent_eval.metrics import (
|
||||
calculate_pool_utilization,
|
||||
|
||||
@ -5,8 +5,7 @@ intelligent evaluation. Pool automatically scales up/down based on load.
|
||||
"""
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Optional
|
||||
from datetime import timedelta
|
||||
|
||||
from sqlmodel import Session, select
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ Calculates:
|
||||
- Eval completion rate
|
||||
"""
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Optional
|
||||
|
||||
from sqlmodel import Session, select
|
||||
|
||||
@ -7,12 +7,12 @@ OpenClaw workers to pick up. Tasks are prioritized by:
|
||||
3. Wait time (等待时间长)
|
||||
"""
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timedelta
|
||||
from typing import Optional
|
||||
|
||||
from sqlmodel import Session, select
|
||||
|
||||
from agenteval.intelligent_eval.models import IntelligentEval, IntelligentEvalStatus
|
||||
from agenteval.intelligent_eval.models import IntelligentEvalStatus
|
||||
from agenteval.storage.db import (
|
||||
IntelligentEvalDB,
|
||||
IntelligentEvalSessionDB,
|
||||
@ -56,7 +56,6 @@ def _calculate_session_deficit(eval_db: IntelligentEvalDB, session: Session) ->
|
||||
|
||||
plan = eval_db.get_plan()
|
||||
time_distribution = plan.get("time_distribution", [])
|
||||
estimated_sessions = plan.get("estimated_sessions", 0)
|
||||
|
||||
# Count current sessions
|
||||
current_sessions = session.exec(
|
||||
|
||||
@ -314,10 +314,8 @@ async def create_decision_log(
|
||||
session: Session = Depends(get_db),
|
||||
) -> dict:
|
||||
"""Create a decision log entry for an intelligent eval."""
|
||||
from agenteval.storage.db import IntelligentEvalDecisionLogDB
|
||||
|
||||
# Verify eval exists
|
||||
from agenteval.storage.db import IntelligentEvalDB
|
||||
from agenteval.storage.db import IntelligentEvalDB, IntelligentEvalDecisionLogDB
|
||||
|
||||
eval_db = session.get(IntelligentEvalDB, eval_id)
|
||||
if eval_db is None:
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
"""API routes for OpenClaw cron pool management."""
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
Loading…
Reference in New Issue
Block a user