Skip to content

Commit

Permalink
Remove unused imports from reranks (opea-project#751)
Browse files Browse the repository at this point in the history
* Remove unused imports

Signed-off-by: Dan Middleton <[email protected]>

* Remove unused imports

Signed-off-by: Dan Middleton <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Dan Middleton <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dcmiddle and pre-commit-ci[bot] authored Sep 30, 2024
1 parent 9df4b3c commit 405a2fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 2 additions & 3 deletions comps/reranks/mosec/langchain/dependency/server-ipex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
10 changes: 1 addition & 9 deletions comps/reranks/tei/local_reranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 405a2fc

Please sign in to comment.