-
Notifications
You must be signed in to change notification settings - Fork 173
fix: Add input validation to model load #404
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
base: main
Are you sure you want to change the base?
Conversation
src/pb_utils.cc
Outdated
bool | ||
IsValidIdentifier(const std::string& input) | ||
{ | ||
if (input.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge two ifs into one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated is statements to simplify into one
// other than 1, it can indicate a permission issue as a result of | ||
// downloading the stub process from a cloud object storage service. | ||
if (WEXITSTATUS(stub_status_code) != 1) { | ||
if (!IsExecutableFile(python_backend_stub)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what's python_backend_stub
file name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the default container build this resolves to: /opt/tritonserver/backends/python/triton_python_backend_stub
but this can change based on the python_lib_
What does the PR do?
Simplify the model load command by invoking the python backend stub without shell interpretation. Additionally add checks for invalid characters in provided model names
Checklist
<commit_type>: <Title>
Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Tests for these changes have been added here: triton-inference-server/server#8276
Where should the reviewer start?
The majority of the changes are in the src/stub_launcher.cc
Review the updated flow for building the model load command.
Test plan:
Added testing to: triton-inference-server/server#8276
31707450
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)