Langchain compatibility issues through spacy-llm

Hi, prodigy 1.14.8 depends on spacy-llm 0.5.1 which expects langchain around version 0.0.249 when auto registering some functions. Newer versions (>=0.0.303) of langchain don't work with prodigy. Calling python -m prodigy textcat.manual my-labels label.csv --label label fails with

File "/some_my_dirs/.venv/lib/python3.9/site-packages/spacy_llm/models/langchain/", line 38, in get_type_to_cls_dict
    return langchain.llms.type_to_cls_dict
  File "/some_my_dirs/.venv/lib/python3.9/site-packages/langchain/", line 308, in __getattr__
    raise AttributeError(f"Could not find: {name}")
AttributeError: Could not find: llms

I don't need langchain as part of spacy-llm. Is there a way to "turn off" this automatic call from prodigy to langchain via spacy-llm which tries to register some functions and fails? Or can we update prodigy with the latest version of spacy-llm?

Thank you very much.

hi @ondraz,

Thanks for your post.

We have a patch to release Prodigy 1.14.9 with support for spacy-llm 0.6. We tested today and should be able to release in a day or so.

You are the best, thank you.

Just published v1.14.9 :tada:

1 Like