langchain deprecation warnings when running prodigy (but I can pip uninstall `langchain`...)

when running prodigy ({textcat|spans}.manual)
I get a TON of warnings from langchain
.... site-packages/langchain/llms/ LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:
from langchain_community.llms import VolcEngineMaasLLM.

like - A LOT
but prodigy still runs.

if I
pip uninstall langchain
Prodigy works fine, and no warnings are issued.

why is it importing langchain to begin with?
it must be, otherwise I wouldn't get the warnings.
But then, why isn't it complaining when I uninstall langchain?

Hey @vish,

langchain is being conditionally imported by spacy-llm ("if available in env, import"), while spacy-llm is imported by Prodigy and that's how the warning pops up.
It's definitely confusing to see this warning out of the blue, so we'll see if it can be captured and presented better to the user.
Independently, I've pinged spacy-llm team to check if this above linked import statement should be updated.

1 Like