Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Local env may require the same package versions as in .mlem file for build #638

Open
aguschin opened this issue Mar 13, 2023 · 3 comments
Open
Labels
bug Something isn't working build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects

Comments

@aguschin
Copy link
Contributor

error at deploying model:

ValueError: Conflicting versions for package numpy: 1.21.6 and 1.23.5 (model saved in one place, getting deployed from some mlem env with numpy 1.23.5)

I got this when I trained a model on one env, but then started deploying it in another env. I assumed we won't check this (and that we even don't need numpy installed in this case). So: we should work around this and don't require numpy installed as well.

How to repro (rough draft, ping me if this doesn't reproduce):

pip install numpy==1.21.6

import mlem

def f(x):
    import numpy
    return x

mlem.api.save(f, "model", sample_data=1)

now:

$ pip install numpy==1.23.5
$ mlem deploy run flyio ...  # but maybe `mlem build docker` will work
@aguschin aguschin added build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects bug Something isn't working labels Mar 13, 2023
@aguschin
Copy link
Contributor Author

@aminalaee, while we're waiting on the answer on the other issue, could you please TAL at this one? I believe this is an important one. This could require some dive, but happy to help investigating. Happy to also clarify the issue if it's not explained clearly.

@aminalaee
Copy link
Contributor

@aguschin I couldn't reproduce this issue. Maybe some steps for reproducing are missing or the issue is resolved?

@aguschin
Copy link
Contributor Author

aguschin commented Apr 26, 2023

Hmm, interesting. I'll try to reproduce this again and post it. Ironically, I'm blocked by #661, but not sure if you can fix that one - reproducing it will require having at least two orgs on fly. Should be easy to fix I assume - probably we don't supply right option to flyctl launch

On the second thought - I can add you to my org, then you'll be in 2 orgs at the same time - and the issue will be reproduced. Please ping me if you would like to check that one out while I'm reproducing this one. To invite you, I'll need your email, so you can send it to me to [email protected] or https://t.me/agusch1n

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Exporting models (building model packages) requirements Finding requirements and dependencies needed to properly serialize objects
Projects
None yet
Development

No branches or pull requests

2 participants