Skip to content
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

Support deployment of a Python 3 model #88

Closed
danielfrg opened this issue Feb 13, 2018 · 8 comments · Fixed by #94
Closed

Support deployment of a Python 3 model #88

danielfrg opened this issue Feb 13, 2018 · 8 comments · Fixed by #94
Assignees

Comments

@danielfrg
Copy link

I was looking at deploying one of the examples (iris) using Python 3 but I don't think its possible to do it at the moment.

I changed the base image using --base-image=python:3 but because of one of the requirements in seldon_requirements.txt more specifically grpc the image cannot be built since that library only works on python 2.

Step 14/19 : RUN cd /tmp &&     pip install --no-cache-dir -r seldon_requirements.txt &&     pip install --no-cache-dir -r requirements.txt
 ---> Running in ee334e1dbc4f
Collecting numpy==1.11.2 (from -r seldon_requirements.txt (line 1))
  Downloading numpy-1.11.2.tar.gz (4.2MB)
Collecting pandas==0.18.1 (from -r seldon_requirements.txt (line 2))
  Downloading pandas-0.18.1.tar.gz (7.3MB)
Collecting grpc==0.3.post19 (from -r seldon_requirements.txt (line 3))
  Downloading grpc-0.3-19.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-he7l6xxx/grpc/setup.py", line 7, in <module>
        version_tuple = __import__('grpc').VERSION
      File "/tmp/pip-build-he7l6xxx/grpc/grpc/__init__.py", line 6, in <module>
        from .rpc import *
      File "/tmp/pip-build-he7l6xxx/grpc/grpc/rpc.py", line 141
        except OSError, ex:
                      ^
    SyntaxError: invalid syntax

I was also wondering if this requirement might be easy to remove since this is another RPC library and not grpc.io, thats is also in the list of seldon_requirements.txt.

@ukclivecox
Copy link
Contributor

You are right. Not sure why we need both? @Maximophone

@Maximophone
Copy link
Contributor

I'm looking into this requirement. However the wrapper is not currently compatible with python 3 and there will be other issues. I'll be working on making it compatible.

@Maximophone
Copy link
Contributor

I can confirm that grpc==0.3.post19 can be dropped from the requirements, it was added by mistake.

@Maximophone
Copy link
Contributor

I have created a pull request (#94 ) for an update that makes the wrapper python 3 compatible.

I have also pushed a new docker image for the wrapper: seldonio/core-python-wrapper:0.7

@danielfrg it would be great if you could try again using this new wrapper to see if you still run into compatibility issues.

@danielfrg
Copy link
Author

I will and report back!

Thanks for fixing this so fast :)

@Maximophone
Copy link
Contributor

No problem, python 3 compatibility is very important and has been overlooked, we need to get this working asap ;)

@danielfrg
Copy link
Author

I tested the new wrapper with 2 python 3 models and everything seams to be working fine 👍

@Maximophone
Copy link
Contributor

Great, we will merge the pull request and close this issue.

agrski pushed a commit that referenced this issue Dec 2, 2022
* replace loaded models with versioned models key

* Fix http cluster removal

* review fixes

* change comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants