fix Ruff
This commit is contained in:
@@ -19,7 +19,7 @@ from typing import Dict, List, Set, Tuple
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
from src.common.logger import get_logger
|
||||
from src.common.logger import get_logger # noqa: E402
|
||||
|
||||
logger = get_logger("evaluation_stats_analyzer")
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ from collections import defaultdict
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
from src.common.database.database_model import Expression
|
||||
from src.common.database.database import db
|
||||
from src.common.logger import get_logger
|
||||
from src.llm_models.utils_model import LLMRequest
|
||||
from src.config.config import model_config
|
||||
from src.common.database.database_model import Expression # noqa: E402
|
||||
from src.common.database.database import db # noqa: E402
|
||||
from src.common.logger import get_logger # noqa: E402
|
||||
from src.llm_models.utils_model import LLMRequest # noqa: E402
|
||||
from src.config.config import model_config # noqa: E402
|
||||
|
||||
logger = get_logger("expression_evaluator_count_analysis_llm")
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ from typing import List, Dict, Set, Tuple
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
from src.llm_models.utils_model import LLMRequest
|
||||
from src.config.config import model_config
|
||||
from src.common.logger import get_logger
|
||||
from src.llm_models.utils_model import LLMRequest # noqa: E402
|
||||
from src.config.config import model_config # noqa: E402
|
||||
from src.common.logger import get_logger # noqa: E402
|
||||
|
||||
logger = get_logger("expression_evaluator_llm")
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ from datetime import datetime
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
from src.common.database.database_model import Expression
|
||||
from src.common.database.database import db
|
||||
from src.common.logger import get_logger
|
||||
from src.common.database.database_model import Expression # noqa: E402
|
||||
from src.common.database.database import db # noqa: E402
|
||||
from src.common.logger import get_logger # noqa: E402
|
||||
|
||||
logger = get_logger("expression_evaluator_manual")
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
from typing import Set
|
||||
|
||||
# 保证可以导入 src.*
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
@@ -32,7 +31,6 @@ def main() -> None:
|
||||
# KG 统计
|
||||
nodes = kg.graph.get_node_list()
|
||||
edges = kg.graph.get_edge_list()
|
||||
node_set: Set[str] = set(nodes)
|
||||
|
||||
para_nodes = [n for n in nodes if n.startswith("paragraph-")]
|
||||
ent_nodes = [n for n in nodes if n.startswith("entity-")]
|
||||
|
||||
@@ -21,18 +21,18 @@ PROJECT_ROOT = os.path.abspath(os.path.join(CURRENT_DIR, ".."))
|
||||
if PROJECT_ROOT not in sys.path:
|
||||
sys.path.append(PROJECT_ROOT)
|
||||
|
||||
from src.common.logger import get_logger # type: ignore
|
||||
from src.config.config import global_config, model_config # type: ignore
|
||||
from src.common.logger import get_logger # type: ignore # noqa: E402
|
||||
from src.config.config import global_config, model_config # type: ignore # noqa: E402
|
||||
|
||||
# 引入各功能脚本的入口函数
|
||||
from import_openie import main as import_openie_main # type: ignore
|
||||
from info_extraction import main as info_extraction_main # type: ignore
|
||||
from delete_lpmm_items import main as delete_lpmm_items_main # type: ignore
|
||||
from inspect_lpmm_batch import main as inspect_lpmm_batch_main # type: ignore
|
||||
from inspect_lpmm_global import main as inspect_lpmm_global_main # type: ignore
|
||||
from refresh_lpmm_knowledge import main as refresh_lpmm_knowledge_main # type: ignore
|
||||
from test_lpmm_retrieval import main as test_lpmm_retrieval_main # type: ignore
|
||||
from raw_data_preprocessor import load_raw_data # type: ignore
|
||||
from import_openie import main as import_openie_main # type: ignore # noqa: E402
|
||||
from info_extraction import main as info_extraction_main # type: ignore # noqa: E402
|
||||
from delete_lpmm_items import main as delete_lpmm_items_main # type: ignore # noqa: E402
|
||||
from inspect_lpmm_batch import main as inspect_lpmm_batch_main # type: ignore # noqa: E402
|
||||
from inspect_lpmm_global import main as inspect_lpmm_global_main # type: ignore # noqa: E402
|
||||
from refresh_lpmm_knowledge import main as refresh_lpmm_knowledge_main # type: ignore # noqa: E402
|
||||
from test_lpmm_retrieval import main as test_lpmm_retrieval_main # type: ignore # noqa: E402
|
||||
from raw_data_preprocessor import load_raw_data # type: ignore # noqa: E402
|
||||
|
||||
|
||||
logger = get_logger("lpmm_manager")
|
||||
|
||||
Reference in New Issue
Block a user