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

S2i integration #115

Merged
merged 12 commits into from
Mar 13, 2018
Merged

S2i integration #115

merged 12 commits into from
Mar 13, 2018

Conversation

ukclivecox
Copy link
Contributor

@ukclivecox ukclivecox commented Mar 13, 2018

fixes #115

@ukclivecox ukclivecox requested a review from Maximophone March 13, 2018 12:10

You can use these wrappers with any model that offers a python API. Some examples are:
* Scikit-learn
* Keras
* statsmodels
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why statsmodels was removed?


After you have copied the required files in your model folder, you run the Seldon wrapper script to turn your model into a dockerised microservice. The wrapper script requires as arguments the path to your model directory, the model name, a version for the docker image, and the name of a docker repository. It will generate a "build" directory that contains the microservice, Dockerfile, etc.
* The file is call MyModel.py and it defines a class MyModel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

called

X : array-like
feature_names : array of feature names (optional)
"""
print("Predict called - will run idenity function")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

identity


Let's explain each piece of this command in more details.
Define the core parametehttps://github.com/SeldonIO/seldon-core/tree/master/examples/transformersrs needed by our python builder image to wrap your model. An example is:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url in the middle of a word


``` docker run seldonio/core-python-wrapper:0.7 ``` : run the core-python-wrapper container.
These values can also be provided or overrriden on the command line when building the image.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overriden

Sample MODEL invocation:
------------------------

s2i build https://github.com/seldonio/seldon-core.git --context-dir=wrappers/s2i/python/test/model-template-app seldonio/seldon-core-s2i-python seldon-core-template-model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seldonio/seldon-core-s2i-python3

Sample ROUTER invocation:
-------------------------

s2i build https://github.com/seldonio/seldon-core.git --context-dir=wrappers/s2i/python/test/router-template-app seldonio/seldon-core-s2i-python seldon-core-template-router
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3

Sample TRANSFORMER invocation:
------------------------------

s2i build https://github.com/seldonio/seldon-core.git --context-dir=wrappers/s2i/python/test/transformer-template-app seldonio/seldon-core-s2i-python seldon-core-template-transformer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python3


For reference, here is the complete list of arguments that can be passed to the script.
An example invocation is:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give example of using local code as well?

@ukclivecox ukclivecox merged commit d28be6c into SeldonIO:master Mar 13, 2018
@ukclivecox ukclivecox deleted the s2i branch February 14, 2020 11:35
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 this pull request may close these issues.

2 participants