diff --git a/comps/reranks/mosec/langchain/dependency/server-ipex.py b/comps/reranks/mosec/langchain/dependency/server-ipex.py index c7127c6ea..1f813d4e6 100644 --- a/comps/reranks/mosec/langchain/dependency/server-ipex.py +++ b/comps/reranks/mosec/langchain/dependency/server-ipex.py @@ -4,17 +4,16 @@ import json import os from os import environ -from typing import Any, Dict, List, Optional, Union +from typing import Dict, List, Optional, Union import intel_extension_for_pytorch as ipex import numpy as np import torch from mosec import Server, Worker -from mosec.mixin import TypedMsgPackMixin from msgspec import Struct from sentence_transformers import CrossEncoder from torch.utils.data import DataLoader -from tqdm.autonotebook import tqdm, trange +from tqdm.autonotebook import tqdm DEFAULT_MODEL = "/home/user/bge-reranker-large" diff --git a/comps/reranks/tei/local_reranking.py b/comps/reranks/tei/local_reranking.py index fca2e68e6..b9d5bf931 100644 --- a/comps/reranks/tei/local_reranking.py +++ b/comps/reranks/tei/local_reranking.py @@ -5,15 +5,7 @@ from sentence_transformers import CrossEncoder -from comps import ( - CustomLogger, - RerankedDoc, - SearchedDoc, - ServiceType, - TextDoc, - opea_microservices, - register_microservice, -) +from comps import CustomLogger, RerankedDoc, SearchedDoc, ServiceType, opea_microservices, register_microservice logger = CustomLogger("local_reranking") logflag = os.getenv("LOGFLAG", False)