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

Fix outdated Trition Transformer code #175

Merged
merged 3 commits into from
Aug 13, 2022

Conversation

xfu83
Copy link
Contributor

@xfu83 xfu83 commented Aug 12, 2022

Signed-off-by: Xin Fu xfu83@bloomberg.net

The issue is that the code snippet in "Implement pre/post processing functions" section is outdated and missing the protocol override.

Proposed Changes

  • Sync the code snippet with the image_transformer_v2.py
  • Bump the version number in link to point to release version 0.9

xfu83 added 2 commits August 12, 2022 11:55
Signed-off-by: Xin Fu <xfu83@bloomberg.net>
Signed-off-by: Xin Fu <xfu83@bloomberg.net>
@netlify
Copy link

netlify bot commented Aug 12, 2022

Deploy Preview for elastic-nobel-0aef7a ready!

Name Link
🔨 Latest commit 65656fc
🔍 Latest deploy log https://app.netlify.com/sites/elastic-nobel-0aef7a/deploys/62f70c99ec46190009fab93b
😎 Deploy Preview https://deploy-preview-175--elastic-nobel-0aef7a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

# Here we reshape the data because triton always returns the flatten 1D array as json if not explicitly requesting binary
# since we are not using the triton python client library which takes care of the reshape it is up to user to reshape the returned tensor.
return {output["name"] : np.array(output["data"]).reshape(output["shape"]) for output in results["outputs"]}
return {output["name"]: np.array(output["data"]).reshape(output["shape"]).tolist()
Copy link
Member

Choose a reason for hiding this comment

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

still worth leaving the comments?

docs/modelserving/v1beta1/triton/torchscript/README.md Outdated Show resolved Hide resolved
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
@yuzisun
Copy link
Member

yuzisun commented Aug 13, 2022

/lgtm
/approve

@kserve-oss-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xfu83, yuzisun

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

@kserve-oss-bot kserve-oss-bot merged commit ae7912d into kserve:main Aug 13, 2022
yuzisun added a commit that referenced this pull request Aug 13, 2022
* Sync trition transformer code

Signed-off-by: Xin Fu <xfu83@bloomberg.net>

* Add filename to the code snippet as title

Signed-off-by: Xin Fu <xfu83@bloomberg.net>

* Update release version

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

Signed-off-by: Xin Fu <xfu83@bloomberg.net>
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
Co-authored-by: Dan Sun <dsun20@bloomberg.net>
@xfu83 xfu83 deleted the triton-transformer-fix branch August 13, 2022 02:59
rachitchauhan43 pushed a commit to rachitchauhan43/website that referenced this pull request Nov 21, 2022
* Sync trition transformer code

Signed-off-by: Xin Fu <xfu83@bloomberg.net>

* Add filename to the code snippet as title

Signed-off-by: Xin Fu <xfu83@bloomberg.net>

* Update release version

Signed-off-by: Dan Sun <dsun20@bloomberg.net>

Signed-off-by: Xin Fu <xfu83@bloomberg.net>
Signed-off-by: Dan Sun <dsun20@bloomberg.net>
Co-authored-by: Dan Sun <dsun20@bloomberg.net>
Signed-off-by: rachitchauhan43 <rachitchauhan43@gmail.com>
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