You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I have been trying to implement spaCy's LLM along with OpenAI's gpt-4.0-turbo model but running into some trouble. For more context, below is the config.cfg file
The python script I was using was importing SpacyLLM from spacy_llm. I was getting the following error at first:
from spacy_llm import SpacyLLM
ImportError: cannot import name 'SpacyLLM' from 'spacy_llm' (/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/spacy_llm/__init__.py)
I re-installed spacy_llm , thinking that there might have been some problem during installation but that did not resolve the problem. I commented out the import but has been running into the following error now:
Traceback (most recent call last):
File "/Users/psarkar/model-training/scripts/test_spacy_llm.py", line 7, in <module>
llm_component = nlp.add_pipe("llm")
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/spacy/language.py", line 821, in add_pipe
pipe_component = self.create_pipe(
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/spacy/language.py", line 709, in create_pipe
resolved = registry.resolve(cfg, validate=validate)
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/confection/__init__.py", line 759, in resolve
resolved, _ = cls._make(
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/confection/__init__.py", line 808, in _make
filled, _, resolved = cls._fill(
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/confection/__init__.py", line 880, in _fill
getter_result = getter(*args, **kwargs)
File "/Users/psarkar/opt/anaconda3/lib/python3.9/site-packages/spacy_llm/pipeline/llm.py", line 81, in make_llm
raise ValueError(
ValueError: Argument `task` has not been specified, but is required (e. g. {'@llm_tasks': 'spacy.NER.v3'}).
Even though @llm_tasks is defined. I would like to initialise the task with spacy.LLM.v1 but have been running into problem. Could somebody please provide some clarity on the situation and what I might be doing wrong?
Hi, community!
So, I have been trying to implement spaCy's LLM along with OpenAI's gpt-4.0-turbo model but running into some trouble. For more context, below is the config.cfg file
The python script I was using was importing
SpacyLLM
fromspacy_llm
. I was getting the following error at first:I re-installed
spacy_llm
, thinking that there might have been some problem during installation but that did not resolve the problem. I commented out the import but has been running into the following error now:Even though
@llm_tasks
is defined. I would like to initialise the task withspacy.LLM.v1
but have been running into problem. Could somebody please provide some clarity on the situation and what I might be doing wrong?The text was updated successfully, but these errors were encountered: