-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup fails non-deterministically due to transient dependency on both bson and pymongo #1245
Comments
Same error. To fix I did:
|
you might want to pin the pymongo version |
@holgerschmeisky thanks for reporting this. Maybe removing the dependency is the easiest fix for this? We would also like to keep the dependency tree as lightweight as possible, so we could ask users who want to use this feature to install (We do this already for the ELMoEmbeddings - users need to install |
…cies GH-1245: slim down dependency tree
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This was fixed a while back. |
First of all, thank you very much for the great work! :)
Description
Flair fails to start up under certain conditions yielding this error
The error is described here as well in the bson project: py-bson/bson#82
To Reproduce
The error happens non-deterministically if dependencies get installed in the wrong order, to fix it I just restarted my build twice and on third attempt it worked.
Environment
flair-0.4.4
Root Cause
The root cause is that Flair depends on both pymongo and bson (via hyperopt, see output of pipdeptree below). pymongo brings its own version of a bson library, so if the order of installing the dependencies is wrong, the bson library gets overwritten leading to the above error.
Suggested Fix
PyMongo is only used by MongoDataset (https://github.com/zalandoresearch/flair/blob/master/flair/datasets.py#L1186), I'd suggest to move it to its own PyPI module or a Gist.
pipdeptree output for flair:
The text was updated successfully, but these errors were encountered: