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

add 2 args to seldon-core-microservice #2193

Merged
merged 2 commits into from
Jul 27, 2020
Merged

Conversation

ntorba
Copy link

@ntorba ntorba commented Jul 24, 2020

What this PR does / why we need it:
This PR adds two arguments to seldon_core_microservice command line tool. The arguments are port and metrics_port.
This addition is necessary to allow multiple endpoints launched with seldon_core_microservice to run simultaneously. The current use for this is to parallelize the test of multiple components before building docker images or deploying to kubernetes.
Which issue(s) this PR fixes:

Fixes #
No issue submitted for this.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Added the arguments `port` and `metrics_port` to `seldon_core_microservice` command line tool. 

@seldondev
Copy link
Collaborator

Hi @ntorba. Thanks for your PR.

I'm waiting for a SeldonIO member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

@ntorba
Copy link
Author

ntorba commented Jul 27, 2020

/assign @RafalSkolasinski

@RafalSkolasinski
Copy link
Contributor

Hi @ntorba,

The ports can be already controlled via environmental variables - do you have an use case in which controlling via environmental variables is not sufficient?

Copy link
Contributor

@RafalSkolasinski RafalSkolasinski left a comment

Choose a reason for hiding this comment

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

PR looks good

python/seldon_core/microservice.py Outdated Show resolved Hide resolved
python/seldon_core/microservice.py Outdated Show resolved Hide resolved
@RafalSkolasinski
Copy link
Contributor

@ntorba if you fix the two highlighted issues we can go ahead with test and merge 🚀

@ntorba
Copy link
Author

ntorba commented Jul 27, 2020

@RafalSkolasinski The

Hi @ntorba,

The ports can be already controlled via environmental variables - do you have an use case in which controlling via environmental variables is not sufficient?

Hi @RafalSkolasinski,
The use case for this is running multiple seldon components in parallel. For example, if I have an inference graph with a transformer, combiner, and 2 models, I would like to be able to run them simultaneously for testing or have the ability to mock api calls to them as a full graph.

@RafalSkolasinski
Copy link
Contributor

The use case for this is running multiple seldon components in parallel. For example, if I have an inference graph with a transformer, combiner, and 2 models, I would like to be able to run them simultaneously for testing or have the ability to mock api calls to them as a full graph.

Well, this is already the case when we run models in the k8s -> they all run in the same k8s pod so they share localhost and we control their ports through environmental variables . It is actually one of the Seldon Core Operator responsibilities to set these properly.

When running locally this should be achievable with

PREDICTIVE_UNIT_SERVICE_PORT=5000 seldon-core-miscroservice ...

@RafalSkolasinski
Copy link
Contributor

Nevertheless, we're happy to go ahead and merge after resolving review issues. Just wanted to highlight that it is already possible to achieve desired behaviour with currently available features - in case it'd be important for someone using older SC versions.

@RafalSkolasinski, here are the updates requested on the pull request.
@ntorba
Copy link
Author

ntorba commented Jul 27, 2020

The use case for this is running multiple seldon components in parallel. For example, if I have an inference graph with a transformer, combiner, and 2 models, I would like to be able to run them simultaneously for testing or have the ability to mock api calls to them as a full graph.

Well, this is already the case when we run models in the k8s -> they all run in the same k8s pod so they share localhost and we control their ports through environmental variables . It is actually one of the Seldon Core Operator responsibilities to set these properly.

When running locally this should be achievable with

PREDICTIVE_UNIT_SERVICE_PORT=5000 seldon-core-miscroservice ...

@RafalSkolasinski
Ah, I hadn't thought of adding the env var definition to the front of the command. That would certainly work just as well.
I just pushed the changes you requested earlier.

@RafalSkolasinski
Copy link
Contributor

/ok-to-test

@RafalSkolasinski
Copy link
Contributor

/test integration
/test notebooks

@seldondev
Copy link
Collaborator

Mon Jul 27 14:27:07 UTC 2020
The logs for [lint] [2] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2193/2.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2193 --build=2

@seldondev
Copy link
Collaborator

Mon Jul 27 14:27:10 UTC 2020
The logs for [pr-build] [1] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2193/1.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2193 --build=1

@seldondev
Copy link
Collaborator

Mon Jul 27 14:27:16 UTC 2020
The logs for [integration] [4] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2193/4.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2193 --build=4

@seldondev
Copy link
Collaborator

Mon Jul 27 14:27:31 UTC 2020
The logs for [notebooks] [3] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2193/3.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2193 --build=3

@RafalSkolasinski
Copy link
Contributor

/approve

@seldondev seldondev added the lgtm label Jul 27, 2020
@RafalSkolasinski RafalSkolasinski removed the request for review from axsaucedo July 27, 2020 17:05
@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RafalSkolasinski

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@seldondev seldondev merged commit f15d00f into SeldonIO:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants