-
Notifications
You must be signed in to change notification settings - Fork 184
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
Poetry installation raises ImportError: cannot import name 'Schema' from 'pydantic' #1010
Comments
Hey @realyashnag , It looks like Poetry is installing a really old version of FastAPI there. It's installing Do you know why that could be the case? |
We also had the same problem, on my side to fix it I explicitly added |
Also so we found the problem cc @franco-bocci , it's because MLServer doesn't have a lower limit so poetry installs a very old version. It is possible to fix it by providing a lower limit for FastAPI package in I added a PR that solves this problem. |
Hey @stephen37, I think it may be worth raising this question on the Poetry community. We need to know more about why Poetry is fetching such an old version of FastAPI to ensure this doesn't come back in the future. Generally package managers will try to fetch the latest version according to the constrains. If poetry is not following that assumption, then do we need to lower-bound every other dependency in MLServer? What would happen with transient dependencies? |
@adriangonz , I agree that it's not strictly a MLServer problem. However, not lower constraining this cause issues as it directly does not work. |
Yeah as Franco said, maybe we can simply remove What do you think? I guess it was the only problematic one with MLServer right? |
Totally agree @franco-bocci @stephen37 - we can go ahead and patch However, my main concern is whether this may also be impacting other dependencies that we don't know about (e.g. other cases within MLServer where Poetry is quietly picking a really old version). This would end up in inconsistent environments that may break unexpectedly. That's why I think it's worth it to understand what's going from the Poetry side so that we can fix it properly. Is this something that you could raise with the Poetry team @franco-bocci @stephen37? |
Yes, I'll check poetry and create an issue there as well if I can. It should go in descending order in that case as well |
Hey @stephen37 @franco-bocci @realyashnag , given that #1033 has already been merged I'll close this one for now. Having said that, once you hear back from the Poetry team, I'd be more than happy to continue the discussion on what we can do better! |
Hey everyone,
Apparently the dependencies are not correctly resolved by poetry here.
yields the following:
Now upon running the
mlserver
:This error suggests downgrading
pydantic
version to1.7
or lower, but then it raises this issue instead.The text was updated successfully, but these errors were encountered: