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 testing for decoupled model use case #7246

Closed
wants to merge 7 commits into from
Closed

Conversation

krishung5
Copy link
Contributor

@krishung5 krishung5 commented May 20, 2024

Testing added for the specific use case of launching a separate thread for decoupled models. Fixed a small issue for the CI as well.

PYBE: triton-inference-server/python_backend#358

@krishung5 krishung5 marked this pull request as ready for review May 21, 2024 23:33
@krishung5 krishung5 requested review from Tabrizian and kthui May 21, 2024 23:37


class TritonPythonModel:
"""This model launches a separate thread to handle the request from a queue. The thread is launched from
Copy link
Member

Choose a reason for hiding this comment

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

Please keep the number of characters in each line below 80.

Copy link
Member

Choose a reason for hiding this comment

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

@dyastremsky do you know why CodeQL didn't catch this?

wait_input = pb_utils.get_input_tensor_by_name(requests[0], "WAIT").as_numpy()
time.sleep(wait_input[0] / 1000)

return None
Copy link
Member

Choose a reason for hiding this comment

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

nit: remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering if you mean remove return None? I thought we'd need to return None from execute if it's in decoupled mode.

Copy link
Member

Choose a reason for hiding this comment

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

Not returning anything is similar to returning None.

@krishung5 krishung5 requested a review from Tabrizian May 23, 2024 19:43
@krishung5
Copy link
Contributor Author

Closing as per discussion a better approach would be handle this in the Triton core instead of PYBE. Filed ticket DLIS-6795 to track this.

@krishung5 krishung5 closed this May 30, 2024
@krishung5 krishung5 deleted the krish-python-finalize branch May 30, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants