fix: Remove unused imports and variables to pass Ruff linting
- Comment out unused format_type in export_results (TODO for CSV export)
- Comment out unused req in evaluate_single (TODO for implementation)
- Remove unused json import from evaluation_service
- Remove unused LLMBundle import from evaluation_service
- Remove unused Mock, MagicMock imports from test_evaluation_service
- Keep Mock import in test_evaluation_framework_demo (actually used)
All 24 tests passing ✅
This commit is contained in:
parent
e49e641643
commit
ad21f079e7
4 changed files with 4 additions and 7 deletions
|
|
@ -431,7 +431,7 @@ async def compare_runs():
|
|||
async def export_results(run_id):
|
||||
"""Export evaluation results as JSON/CSV"""
|
||||
try:
|
||||
format_type = request.args.get("format", "json")
|
||||
# format_type = request.args.get("format", "json") # TODO: Use for CSV export
|
||||
|
||||
result = EvaluationService.get_run_results(run_id)
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ async def evaluate_single():
|
|||
}
|
||||
"""
|
||||
try:
|
||||
req = await get_request_json()
|
||||
# req = await get_request_json() # TODO: Use for single evaluation implementation
|
||||
|
||||
# TODO: Implement single evaluation
|
||||
# This would execute the RAG pipeline and return metrics immediately
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ Provides functionality for evaluating RAG system performance including:
|
|||
"""
|
||||
|
||||
import logging
|
||||
import json
|
||||
from typing import List, Dict, Any, Optional, Tuple
|
||||
from datetime import datetime
|
||||
from timeit import default_timer as timer
|
||||
|
|
@ -34,7 +33,6 @@ from timeit import default_timer as timer
|
|||
from api.db.db_models import EvaluationDataset, EvaluationCase, EvaluationRun, EvaluationResult
|
||||
from api.db.services.common_service import CommonService
|
||||
from api.db.services.dialog_service import DialogService, chat
|
||||
from api.db.services.llm_service import LLMBundle
|
||||
from common.misc_utils import get_uuid
|
||||
from common.time_utils import current_timestamp
|
||||
from common.constants import StatusEnum
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ This test doesn't require RAGFlow dependencies.
|
|||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock, MagicMock
|
||||
from unittest.mock import Mock
|
||||
|
||||
|
||||
class TestEvaluationFrameworkDemo:
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ Tests cover:
|
|||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch, MagicMock
|
||||
from common.misc_utils import get_uuid
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
class TestEvaluationDatasetManagement:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue