Closed zhengligs closed 1 year ago
+1 I don't think everything should be included by default.
@hwchase17 FYI , deeplake also brings in cyclic dependency, which i have raised here https://github.com/activeloopai/deeplake/issues/2220
+1 this should be documented somewhere, in particular since deeplake pulls in humbug for automatic usability tracking (by default presuming user content). That is by installing langchain[all] one automatically participates in deeplake usage tracking, even if you don't actively use it. https://github.com/activeloopai/deeplake/issues/1754
@miraculixx I really don't think this is the case because the reporting works only after you use deeplake. Looping in @istranic to confirm.
@mikayelh Unfortunately yes, see below. In a nutshell, after pip install langchain[all]
it is enough to import langchain
and all uncaught(?) subsequent exceptions will trigger HumbugReport.publish()
Langchain attempts to import all supported vectorstores, including deeplake. If it is installed, it will import deeplake.
upon import deeplake
, a HumbugReporter is set up and an exception hook added. That is any future exception triggers a reporter.publish()
call to https://spire.bugout.dev.
Hi @miraculixx Thx for digging into this. Yesterday we disabled reporting upon importing deeplake for an unrelated reason. We'll get rid of the exception hood, and that will eliminate all reporting that happens by virtue of only importing deeplake.
@istranic Great news, much appreciated!
Hi, @zhengligs! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
Based on my understanding, the issue you raised was about the deeplake
package having a dependency issue where it adds a significant number of dependencies when installed, despite being marked as optional. The maintainers have acknowledged this issue and have made changes to disable reporting and eliminate the exception hook that triggers reporting upon importing deeplake
. These changes have been merged and should resolve the problem.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your contribution to the LangChain repository!
I noticed installing
langchain
usingpip install langchain
adds many more packages recently.Here is the dependency map shown by
johnnydep
:deeplake
brings in many packages, although it's marked asoptional
inpyproject.toml
.