refactor: update import paths and benchmark discovery

Updated import paths to use direct module references instead of relative paths. Implemented dynamic benchmark discovery based on the contents of the tests/ directory, allowing for more flexible benchmark configuration without requiring code changes. This change improves maintainability and makes it easier to add new benchmarks.
This commit is contained in:
2026-02-21 17:28:52 +03:00
parent 0dc4359755
commit fcda2be4a9
12 changed files with 68 additions and 66 deletions

View File

@@ -13,7 +13,7 @@ from pathlib import Path
# Добавляем путь к исходникам, чтобы импортировать base
sys.path.insert(0, str(Path(__file__).parent.parent))
from src.benchmarks.base import TEST_SEPARATOR
from benchmark import TEST_SEPARATOR
def convert_tests(test_dir: str) -> None:
"""Конвертирует все тесты в указанной директории."""

View File

@@ -19,7 +19,7 @@ from pymongo import MongoClient
sys.path.insert(0, str(Path(__file__).parent.parent))
from src.constants import TEST_SEPARATOR
from src.models.ollama_client import OllamaClient
from ollama_client import OllamaClient
def sanitize_filename(filename: str) -> str:
"""

View File

@@ -20,7 +20,7 @@ from typing import Dict, List, Optional
# Добавляем путь к исходникам, чтобы импортировать ollama_client
sys.path.insert(0, str(Path(__file__).parent.parent))
from src.models.ollama_client import OllamaClient
from ollama_client import OllamaClient
from src.constants import TEST_SEPARATOR
def generate_translation_test(ollama: OllamaClient, model: str) -> Dict[str, str]: