Open jprall32 opened 3 days ago
You need to download the instructor XL embeddings model local that’s what the error says you are missing the embeddings model you can download it from hugginface
On Monday, November 11, 2024, jprall32 @.***> wrote:
I get this error after I upload the pcap and select the model:
File "/usr/local/lib/python3.12/dist-packages/streamlit/ runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/usr/local/lib/python3.12/dist-packages/streamlit/ runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/packet_raptor/packet_raptor.py", line 602, in chat_interface() File "/packet_raptor/packet_raptor.py", line 526, in chat_interface st.session_state['chat_instance'] = ChatWithPCAP(json_path=json_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/packet_raptor/packet_raptor.py", line 46, in init self.embedding_model = load_model() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/streamlit/ runtime/caching/cache_utils.py", line 217, in call return self._get_or_create_cached_value(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/streamlit/ runtime/caching/cache_utils.py", line 242, in _get_or_create_cached_value return self._handle_cache_miss(cache, value_key, func_args, func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/streamlit/ runtime/caching/cache_utils.py", line 299, in _handle_cache_miss computed_value = self._info.func(*func_args, *func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/packet_raptor/packet_raptor.py", line 40, in load_model embedding_model=HuggingFaceInstructEmbeddings( model_name="hkunlp/instructor-large", modelkwargs={"device": "cuda"}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/langchain community/embeddings/huggingface.py", line 194, in init* raise ImportError("Dependencies for InstructorEmbedding not found.") from e
— Reply to this email directly, view it on GitHub https://github.com/automateyournetwork/packet_raptor/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQSYCTAHEYR4OJ2ONLQO4D2AEICZAVCNFSM6AAAAABRSSR6TCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TAMZUGQ4TENY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Does this app not work with python 3.11? I installed the model succesfully but it still did not see it and that path it was talking about were related to python 3.12. When I had python 3.12, your install script barfed everywhere wanting 3.11
Shouldn't this be a part of the install process then?
Can you provide specifc examples syntax on how you want that model installed? It installed when I used this script
more download_model.py from transformers import AutoModel, AutoTokenizer
model_name = "hkunlp/instructor-large"
model = AutoModel.from_pretrained(model_name) tokenizer = AutoTokenizer.from_pretrained(model_name)
print(f"Model and tokenizer for '{model_name}' downloaded and cached successfully.")
Getting the same error after installing InstructorEmbedding.
I get this error after I upload the pcap and select the model:
File "/usr/local/lib/python3.12/dist-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/usr/local/lib/python3.12/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/packet_raptor/packet_raptor.py", line 602, in
chat_interface()
File "/packet_raptor/packet_raptor.py", line 526, in chat_interface
st.session_state['chat_instance'] = ChatWithPCAP(json_path=json_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/packet_raptor/packet_raptor.py", line 46, in init
self.embedding_model = load_model()
^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/streamlit/runtime/caching/cache_utils.py", line 217, in call
return self._get_or_create_cached_value(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/streamlit/runtime/caching/cache_utils.py", line 242, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/streamlit/runtime/caching/cache_utils.py", line 299, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/packet_raptor/packet_raptor.py", line 40, in load_model
embedding_model=HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-large", model_kwargs={"device": "cuda"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/langchain_community/embeddings/huggingface.py", line 194, in init
raise ImportError("Dependencies for InstructorEmbedding not found.") from e