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

[BUG] when we serve topK model on Triton it only returns scores #1220

Closed
rnyak opened this issue Oct 20, 2023 · 0 comments · Fixed by #1225
Closed

[BUG] when we serve topK model on Triton it only returns scores #1220

rnyak opened this issue Oct 20, 2023 · 0 comments · Fixed by #1225
Assignees
Labels
bug Something isn't working P0 status/needs-triage

Comments

@rnyak
Copy link
Contributor

rnyak commented Oct 20, 2023

Bug description

when we serve topK model for a session-based model on Triton it only returns scores, but it also needs to serve topK ids together with the scores.

This issue is related to model signatures, the topK model output from model signature is only one, but it should be two.

Steps/Code to reproduce bug

Run this gist first. Check out the ensemble model output. you will see it has only one output noT two.

To check the Triton restponse, then do the following steps:

  1. Launch triton on terminal and load the model with tritonserver --model-repository={OUTPUT_DATA_DIR}/<name of ensemble folder>/

  2. prepare input data and send a request

from merlin.systems.triton import convert_df_to_triton_input
import tritonclient.grpc as grpcclient

validation_data = pd.read_parquet('/workspace/data/interactions_merged_df.parquet')
inputs = convert_df_to_triton_input(wf.input_schema, validation_data.iloc[:100])

with grpcclient.InferenceServerClient("localhost:8001") as client:
    response = client.infer('executor_model', inputs)

output = response.as_numpy('item_id-list/categorical_output')

Expected behavior

Environment details

  • Merlin version:
  • Platform:
  • Python version:
  • PyTorch version (GPU?):
  • Tensorflow version (GPU?):

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0 status/needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants