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

Unexpected Behavior: ModelInferRequest Fields Overwritten with Incorrect Values in Triton C++ Client #778

Open
fighterhit opened this issue Sep 5, 2024 · 0 comments

Comments

@fighterhit
Copy link

fighterhit commented Sep 5, 2024

I use the tritonserver:22.12-py3-sdk NGC image and test it with the following code under /workspace/install, but the output seems like the fields are all overwritten by the last set value. Why is this happening?

  • $client_inc=/workspace/install/include
  • $client_lib=/workspace/install/lib
g++ triton_test.cpp -o triton_test -I$client_inc -L$client_lib -lgrpcclient -lprotobuf
  • triton_test.cpp
#include "grpc_client.h"

int main() {
    inference::ModelInferRequest infer_request_;

    infer_request_.set_model_name("pm");
    infer_request_.set_model_version("");
    infer_request_.set_id("2336");

    std::cout << "model name: [" << infer_request_.model_name() << "]" << std::endl;
    std::cout << "model version: [" << infer_request_.model_version() << "]" << std::endl;
    std::cout << "id: [" << infer_request_.id() << "]" << std::endl;
    return 0;
}
#output:
model name: [2336]
model version: [2336]
id: [2336]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant