Skip to content

Bundling kserving backend and client in the same pypi#250

Merged
k8s-ci-robot merged 2 commits intokserve:masterfrom
jinchihe:update_setup_for_kservice_python_pkg
Aug 13, 2019
Merged

Bundling kserving backend and client in the same pypi#250
k8s-ci-robot merged 2 commits intokserve:masterfrom
jinchihe:update_setup_for_kservice_python_pkg

Conversation

@jinchihe
Copy link
Copy Markdown
Contributor

@jinchihe jinchihe commented Jul 16, 2019

What this PR does / why we need it:
Develop python pip package for KFServing SDK, user can directly install kfserving sdk using pip install kfserving, and then call kfserving sdk apis to create/check/patch/delete kfservice.

Which issue(s) this PR fixes :
Fixes #246

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Support installing KFServing Python SDK by `pip install kfserving` 

This change is Reviewable

Comment thread sdk/requirements.txt Outdated
@jinchihe
Copy link
Copy Markdown
Contributor Author

The kfserving python SDK has been published to here: https://pypi.org/project/kfserving/

And user can install kfserving sdk from pip easily, and kfserving SDK works fine after installation.

(python36) [root@jinchi1 sdk]# pip install kfserving
Collecting kfserving
  Downloading https://files.pythonhosted.org/packages/71/7d/62da6cfcf79522351ac1d1327fbdcfdc7de84a75afc7596df210b69c8dab/kfserving-0.0.1.tar.gz
.....
Building wheels for collected packages: kfserving
  Building wheel for kfserving (setup.py) ... done
  Stored in directory: /root/.cache/pip/wheels/f1/8d/2f/c4b8db954491f4d997178c302acc3d4e66585899d25bb2e9db
Successfully built kfserving
Installing collected packages: kfserving
Successfully installed kfserving-0.0.1

@jinchihe jinchihe changed the title [WIP] kfservice python sdk package kfservice python sdk package Jul 18, 2019
@jinchihe
Copy link
Copy Markdown
Contributor Author

/assign @yuzisun
Thank you in advance!

@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

@yuzisun
Copy link
Copy Markdown
Member

yuzisun commented Jul 20, 2019

mostly looks good to me, do you currently publish to PyPi manually ?

Comment thread sdk/setup.py Outdated
@jinchihe
Copy link
Copy Markdown
Contributor Author

mostly looks good to me, do you currently publish to PyPi manually ?

Yes, I do that manually, since there are only one command python setup.py sdist upload -r pypi to do that, and before running the CLI, we also need to configure the .pypirc for user-owned username/password, so I did not set it in script.

@yuzisun yuzisun mentioned this pull request Jul 23, 2019
@jinchihe
Copy link
Copy Markdown
Contributor Author

/hold

We are discussing more details in the #268 , may update once somethings decided. Thanks.

@jinchihe
Copy link
Copy Markdown
Contributor Author

jinchihe commented Jul 26, 2019

Hello Reviews:

From discussion and analysis from the ticket #268 , I update the PR changes, since the update is large, I would like to explain more for easy revewing. Overall, I merged the sdk into the python/kfserving, the especial changes are as following:

  1. Merged python/kfserving/kfserving/__init__.py and sdk/kfserving/__init__.py
  2. Merged the python/kfserving/setup.py and sdk/setup.py
  3. Merged the README.md under python/kfserving/ and sdk
  4. Moved test_server.py and test_storage.py under python/kfserving/kfserving/ to python/kfserving/test
  5. Updated hack/Python-sdk/README.md to describe how to release kfserving SDK to Pypi.
  6. Udpated kf_serving_client.py and test_kfservice_client.py to handle pylint problem (ignored some file for pylint since that generated, better to do not updates).
  7. Ignored autogenerated below files but I think useless: .swagger-codegen-ignore .swagger-codegen/ .travis.yml git_push.sh test-requirements.txt tox.ini under sdk

There is a problem that the sdk-gen.sh will overwrite some file such current README.md in the future, that need to be updated that manually before check-in.

/cc @yuzisun @ellis-bigelow @animeshsingh

@jinchihe jinchihe changed the title kfservice python sdk package [WIP] Bundling kserving backend and client in the same pypi Jul 26, 2019
Comment thread python/kfserving/setup.py Outdated
Comment thread python/kfserving/setup.py
Comment thread python/kfserving/setup.py
@jinchihe jinchihe changed the title [WIP] Bundling kserving backend and client in the same pypi Bundling kserving backend and client in the same pypi Aug 7, 2019
@jinchihe
Copy link
Copy Markdown
Contributor Author

jinchihe commented Aug 7, 2019

/hold cancel

@animeshsingh
Copy link
Copy Markdown
Member

CC @yuzisun

Copy link
Copy Markdown
Contributor

@ellistarn ellistarn left a comment

Choose a reason for hiding this comment

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

Nice work!!

Comment thread hack/Python-sdk/README.md
Comment thread python/kfserving/README.md Outdated
@jinchihe
Copy link
Copy Markdown
Contributor Author

jinchihe commented Aug 11, 2019

Rebased to resolve the conficts, but presubmit tests faild, that's caused by no space in automation env.

fatal: could not create leading directories of '/mnt/test-data-volume/kubeflow-kfserving-presubmit-e2e-250-7dd4267-5664-a27c/src/kubeflow
/kfserving': No space left on device

@animeshsingh
Copy link
Copy Markdown
Member

There is a problem that the sdk-gen.sh will overwrite some file such current README.md in the future, that need to be updated that manually before check-in.

Can we make a comment on top of sdk-gen.sh to remind that folks need to replace README.md post the sdk generation?

Nice job @jinchihe

@jinchihe
Copy link
Copy Markdown
Contributor Author

Can we make a comment on top of sdk-gen.sh to remind that folks need to replace README.md post the sdk generation?

@animeshsingh Great comments! Added notes in the scripts and README file for the script.

@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

@ellistarn
Copy link
Copy Markdown
Contributor

Nice!
/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ellis-bigelow

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

The pull request process is described here

Details 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

@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jinchihe
Copy link
Copy Markdown
Contributor Author

/retest

@animeshsingh
Copy link
Copy Markdown
Member

/lgtm

@animeshsingh
Copy link
Copy Markdown
Member

@yuzisun @ellis-bigelow final comments on this?

@jinchihe
Copy link
Copy Markdown
Contributor Author

@yuzisun @ellis-bigelow final comments on this?

@animeshsingh The PR has been approved by Ellis, and That's OK from Dan, but the presummit testing already failed since timeout or some strange reasons...

/retest

@k8s-ci-robot k8s-ci-robot merged commit 2c52846 into kserve:master Aug 13, 2019
@jinchihe jinchihe deleted the update_setup_for_kservice_python_pkg branch August 13, 2019 00:54
ellistarn pushed a commit to ellistarn/kfserving that referenced this pull request Jul 28, 2020
* kfservice python sdk package

* merge the sdk to kfserving
rafvasq pushed a commit to rafvasq/kserve that referenced this pull request Jul 21, 2023
Motivation

The Triton runtime can be used with model-mesh to serve PyTorch torchscript models, but it does not support arbitrary PyTorch models i.e. eager mode. KServe "classic" has integration with TorchServe but it would be good to have integration with model-mesh too so that these kinds of models can be used in distributed multi-model serving contexts.

Modifications

The bulk of the required changes are to the adapter image, covered by PR kserve/modelmesh-runtime-adapter#34.

This PR contains the minimal controller changes needed to enable the support:
- TorchServe ServingRuntime spec
- Add "torchserve" to the list of supported built-in runtime types
- Add "ID extraction" entry for TorchServe's gRPC Predictions RPC so that model-mesh will automatically extract the model name from corresponding request messages

Note the supported model format is advertised as "pytorch-mar" to distinguish from the existing "pytorch" format that refers to raw TorchScript .pt files as supported by Triton.

Result

TorchServe can be used seamlessly with ModelMesh Serving to serve PyTorch models, including eager mode.

Resolves kserve#63

Signed-off-by: Nick Hill <nickhill@us.ibm.com>
rafvasq added a commit to rafvasq/kserve that referenced this pull request Jul 21, 2023
#### Motivation
Support for TorchServe was added in kserve#250 and kserve/modelmesh-runtime-adapter#34. A test should be added for it as well.

#### Modifications
- Adds basic FVT for load/inference with a TorchServe MAR model using the native TorchServe gRPC API
- Disables OVMS runtime and tests to allow TorchServe to be tested due to resource constraints

#### Result
Closes kserve#280 

Signed-off-by: Rafael Vasquez <raf.vasquez@ibm.com>
terrytangyuan pushed a commit to terrytangyuan/kserve that referenced this pull request May 13, 2024
…ent-updates/kserve-agent-28

Update kserve-agent-28 to fc7ef75
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.

Develop python pip package for KFServing SDK

7 participants