triton-inference-server / server

The Triton Inference Server provides an optimized cloud and edge inferencing solution.
https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/index.html
BSD 3-Clause "New" or "Revised" License
8.35k stars 1.49k forks source link

Documentation for classification extension doesn't explain label_filename #6186

Open david-waterworth opened 1 year ago

david-waterworth commented 1 year ago

Is your feature request related to a problem? Please describe. I cannot find any documentation on configuring a model to produce text labels when requested. I found another issue (https://github.com/triton-inference-server/server/issues/5322) that implied that you need to set label_filename in the config.pbtxt, and I guessed that it's a text file that contains the labels sequentially.

This is confirmed by the protobuf https://github.com/triton-inference-server/common/blob/main/protobuf/model_config.proto#L1922 but searching the documentation didn't produce any details on the format.

Describe the solution you'd like Provide details on the label file format in https://github.com/triton-inference-server/server/blob/main/docs/protocol/extension_classification.md

It would also be useful if, instead of returning the topk logits, there was an option to apply softmax first (if the model output is logits). Otherwise you cannot get compute the proba for multiclass classification as you need the sum of logits over all classes.

krishung5 commented 1 year ago

Hi @david-waterworth, the label_filename file is a newline-delimited list of labels. You can refer to our classification model example here to see what it looks like.

Currently in our classification doc, the description for label:

The format of the returned string will be “:[:

I agree that the documentation needs to be improved to be clearer. I've filed a ticket(DLIS-5323) for the team to track this effort. Thank you for bringing this to our attention.