-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
In model configuration support defining list of tensors as input #2593
Comments
So your model can accept variable number of inputs? Or what you are showing here is batching the images into one input? Usually the image models accepts a batch of images as input to process a group of images in the same inference, and Triton can serve such model and you will need to change the |
While libtorch does support passing lists of tensors, Tritonserver does not. You can build a simple wrapper model that coverts a tensor into a list of tensors and passes it on to your model. Once you have this wrapper model, simply trace the same and you should be able to use this model inside Triton. |
Closing this since Triton does not intend on adding support for handling list of tensors as inputs. Please use the work around shared above. |
@CoderHam What do you exactly mean by the wrapper model, could you please explain it to me a bit? |
I guess
like this
|
Is your feature request related to a problem? Please describe.
Some of the models take a list of images to inference. In the model configuration file "config.pbtxt" the tensor datatypes supported by Triton doesn't have a list. Is there a plan to support list or is there a work around to pass a list of tensors to model.
Example:
Retinanet model takes list of images
import torch
import torchvision.models as models
retina50 = models.detection.retinanet_resnet50_fpn(pretrained=True)
retina50.eval()
dummy_input = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)]
output = retina50(dummy_input)
Describe the solution you'd like
Support List of tensors or alternative to provide the list.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
In the config.pbtxt have the following input which doesn't work with the model.
input [
{
name: "input__0"
data_type: TYPE_FP32
dims: [3, 480, 640]
}
]
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: