Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can your code run? I encountered some problems when running it. #1

Open
zjj1333 opened this issue Oct 16, 2024 · 0 comments
Open

Can your code run? I encountered some problems when running it. #1

zjj1333 opened this issue Oct 16, 2024 · 0 comments

Comments

@zjj1333
Copy link

zjj1333 commented Oct 16, 2024

python main.py
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain/init.py:30: UserWarning: Importing PromptTemplate from langchain root module is no longer supported. Please use langchain_core.prompts.PromptTemplate instead.
warnings.warn(
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/auto_gptq/nn_modules/triton_utils/kernels.py:411: FutureWarning: torch.cuda.amp.custom_fwd(args...) is deprecated. Please use torch.amp.custom_fwd(args..., device_type='cuda') instead.
def forward(ctx, input, qweight, scales, qzeros, g_idx, bits, maxq):
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/auto_gptq/nn_modules/triton_utils/kernels.py:419: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
def backward(ctx, grad_output):
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/auto_gptq/nn_modules/triton_utils/kernels.py:461: FutureWarning: torch.cuda.amp.custom_fwd(args...) is deprecated. Please use torch.amp.custom_fwd(args..., device_type='cuda') instead.
@custom_fwd(cast_inputs=torch.float16)
CUDA extension not installed.
CUDA extension not installed.
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain/init.py:30: UserWarning: Importing HuggingFacePipeline from langchain root module is no longer supported. Please use langchain_community.llms.huggingface_pipeline.HuggingFacePipeline instead.
warnings.warn(
load INSTRUCTOR_Transformer
max_seq_length 512
/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/sentence_transformers/models/Dense.py:63: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
model.load_state_dict(torch.load(os.path.join(input_path, 'pytorch_model.bin'), map_location=torch.device('cpu')))
Traceback (most recent call last):
File "/home/bfs/ZJJ_STUDY2_JIAYOU/DFCD/data_preprocess/NeurIPS2020/Wikipedia-Continual-Learning-RAG-main/main.py", line 24, in
db, prompt, memory, llm = training()
File "/home/bfs/ZJJ_STUDY2_JIAYOU/DFCD/data_preprocess/NeurIPS2020/Wikipedia-Continual-Learning-RAG-main/main.py", line 13, in training
db = data_preprocessing().create_document().create_embedding()
File "/home/bfs/ZJJ_STUDY2_JIAYOU/DFCD/data_preprocess/NeurIPS2020/Wikipedia-Continual-Learning-RAG-main/data_preprocessing.py", line 44, in create_embedding
db = Chroma.from_documents(
File "/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain_community/vectorstores/chroma.py", line 878, in from_documents
return cls.from_texts(
File "/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain_community/vectorstores/chroma.py", line 842, in from_texts
chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
File "/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain_community/vectorstores/chroma.py", line 277, in add_texts
embeddings = self._embedding_function.embed_documents(texts)
File "/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/langchain_community/embeddings/huggingface.py", line 222, in embed_documents
embeddings = self.client.encode(
File "/home/bfs/miniconda3/envs/rag/lib/python3.9/site-packages/InstructorEmbedding/instructor.py", line 524, in encode
if isinstance(sentences[0],list):
IndexError: list index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant