mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
remove unused imports in Python (#145)
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import os
|
||||
import re
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
import sys
|
||||
from typing import Any, List, Mapping, Union
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
import logging
|
||||
import json
|
||||
import time
|
||||
import os
|
||||
import sys
|
||||
from typing import Any, List, Mapping, Union
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
@@ -14,7 +11,6 @@ from plugin_call.prompt_construct import (
|
||||
construct_plugin_pool_prompt,
|
||||
construct_task_prompt,
|
||||
plugin_selection_output_parse,
|
||||
plugins_config_format_convert,
|
||||
)
|
||||
from util.llm_instance import llm
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
import os
|
||||
import sys
|
||||
import uuid
|
||||
import numpy as np
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import Any, List, Mapping
|
||||
|
||||
from chromadb.api import Collection, Documents, Embeddings
|
||||
from chromadb.api import Collection
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -2,30 +2,23 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import uuid
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import List
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
from chromadb.api import Collection, Documents, Embeddings
|
||||
|
||||
from langchain.llms import OpenAI
|
||||
from chromadb.api import Collection
|
||||
|
||||
from preset_query_db import (
|
||||
get_ids,
|
||||
add2preset_query_collection,
|
||||
query2preset_query_collection,
|
||||
parse_retrieval_preset_query,
|
||||
preset_query_retrieval_format,
|
||||
empty_preset_query_collection,
|
||||
preset_query_collection_size,
|
||||
)
|
||||
|
||||
from util.text2vec import Text2VecEmbeddingFunction
|
||||
|
||||
from run_config import CHROMA_DB_PERSIST_PATH, PRESET_QUERY_COLLECTION_NAME
|
||||
from run_config import PRESET_QUERY_COLLECTION_NAME
|
||||
from util.chromadb_instance import client
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from typing import List, Mapping
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from langchain.prompts.few_shot import FewShotPromptTemplate
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.vectorstores import Chroma
|
||||
from langchain.embeddings import OpenAIEmbeddings, HuggingFaceEmbeddings
|
||||
from langchain.prompts.example_selector import SemanticSimilarityExampleSelector
|
||||
|
||||
import chromadb
|
||||
from chromadb.config import Settings
|
||||
from chromadb.api import Collection, Documents, Embeddings
|
||||
|
||||
from few_shot_example.sql_exampler import examplars as sql_examplars
|
||||
from util.text2vec import Text2VecEmbeddingFunction, hg_embedding
|
||||
from util.text2vec import hg_embedding
|
||||
from util.chromadb_instance import client as chromadb_client, empty_chroma_collection_2
|
||||
from run_config import TEXT2DSL_COLLECTION_NAME, TEXT2DSL_FEW_SHOTS_EXAMPLE_NUM
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from typing import List, Mapping
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
import os
|
||||
import sys
|
||||
from typing import List, Mapping
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from typing import List, Union, Mapping
|
||||
import logging
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from typing import List, Union, Mapping
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
import os
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import uvicorn
|
||||
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import Any, List, Mapping
|
||||
|
||||
from fastapi import FastAPI, HTTPException
|
||||
|
||||
@@ -19,7 +19,6 @@ from preset_retrieval.run import (
|
||||
)
|
||||
from preset_retrieval.preset_query_db import (
|
||||
add2preset_query_collection,
|
||||
update_preset_query_collection,
|
||||
empty_preset_query_collection,
|
||||
delete_preset_query_by_ids,
|
||||
update_preset_query_collection,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
|
||||
import chromadb
|
||||
from chromadb.api import Collection, Documents, Embeddings
|
||||
from chromadb.api import Collection
|
||||
from chromadb.config import Settings
|
||||
|
||||
from run_config import CHROMA_DB_PERSIST_PATH
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
import os
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
from typing import List
|
||||
|
||||
from langchain.embeddings import HuggingFaceEmbeddings
|
||||
from chromadb.api.types import Documents, EmbeddingFunction, Embeddings
|
||||
from langchain.embeddings import HuggingFaceEmbeddings
|
||||
|
||||
from run_config import HF_TEXT2VEC_MODEL_NAME
|
||||
|
||||
|
||||
Reference in New Issue
Block a user