# Deepstream Triton Ensemble Model Error

**URL:** <https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415>\
**Category:** DeepStream SDK\
**Tags:** inference-server-triton\
**Created:** [May 5, 2022, 1:40am UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415 "2022-05-05T01:40:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![beauy152](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@beauy152](https://forums.developer.nvidia.com/u/beauy152)\
**Post date:** [May 5, 2022, 1:40am UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/1 "2022-05-05T01:40:38Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** GPU  
**• DeepStream Version** 6.0.1  
**• TensorRT Version** 8.0.1  
**• NVIDIA GPU Driver Version (valid for GPU only)** 510.47.03

Hi,  
Currently i am developing a deepstream-6 pipeline, which calls a nvinferserver component for inferencing - i have attempted to implement a `ensemble` model, but am running into the following issue:

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/5/4/5427d8fb408b47370b93580499f3c3e58775b52b.png)

immediately before this error, the OSD output briefly appears, but quickly closes before any inferencing results are rendered.

Here is a greater screenshot with more information preceeding application exit -

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/1/d/1dd9bc1fa0568c1a440961a6af139826ab084779.png)

Any help would be appreciated as this is currently a blocker

Attached Below are all config files for models, ensemble, and inferserver  
[densenet\_onnx\_config.pbtxt](https://forums.developer.nvidia.com/uploads/short-url/lESDO0U1FxDQNnguj4pwLXInnd9.pbtxt) (1.9 KB)  
[dstest1\_pgie\_inferserver\_config.txt](https://forums.developer.nvidia.com/uploads/short-url/17nsLcGuUazCCaWZMnP6lhphQl2.txt) (1.5 KB)  
[ensemble\_config.pbtxt](https://forums.developer.nvidia.com/uploads/short-url/vkHcnKx0EaSZBa5W3F2FgTPc6oh.pbtxt) (1.5 KB)  
[ssd\_inception\_config.pbtxt](https://forums.developer.nvidia.com/uploads/short-url/AsVunLj7uaEjrNRhjUOwhV8Fwi3.pbtxt) (2.5 KB)

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [May 5, 2022, 3:21pm UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/3 "2022-05-05T15:21:18Z")

</div>

thank for the repo!  
Will check and get back

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [May 16, 2022, 2:39pm UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/4 "2022-05-16T14:39:08Z")

</div>

Hi @beauy152 ,  
What input resolution and batch size does [dstest1\_pgie\_inferserver\_config.txt](https://forums.developer.nvidia.com/uploads/short-url/17nsLcGuUazCCaWZMnP6lhphQl2.txt) TRT engine supports? Seems it failed with error below because you didn’t provide a input dims in the config?  
Is it possible to just provide us a repo package so that we can untart and run a command repo the issue?

 ![image](https://global.discourse-cdn.com/nvidia/original/3X/7/0/701548a55311bfcf9e211e27597652aa9754788c.jpeg)

---

<div class="post-metadata">

**Author:** ![beauy152](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@beauy152](https://forums.developer.nvidia.com/u/beauy152)\
**Post date:** [May 20, 2022, 1:37am UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/5 "2022-05-20T01:37:27Z")

</div>

Hi @mchi ,  
The muxer is set to 1920\*1080 stream resolution with batch\_size set to 1 (though i have tested with higher batch sizes to the same result) - the input dims are specified in each models ‘.pbtxt’ files that i attached above.

I have attached the repo below with a short Readme.  
[7\_multi-inference.tar.xz](https://forums.developer.nvidia.com/uploads/short-url/6TiIntwGjTEfD4RUD5QnQSgYVQw.xz) (520.4 KB)

Thanks so much for any help with this - documentation in this area appears very limited.

Thanks again -

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [May 22, 2022, 2:25pm UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/6 "2022-05-22T14:25:46Z")

</div>

Hi @beauy152  
In your first post, there are 4 configs, but [7\_multi-inference.tar.xz](https://forums.developer.nvidia.com/uploads/short-url/6TiIntwGjTEfD4RUD5QnQSgYVQw.xz) only includes one config, is it the same repo?  
And, seems 7\_multi-inference\ensemble\_test\1 is empty, is it enough to repo it?

---

<div class="post-metadata">

**Author:** ![beauy152](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@beauy152](https://forums.developer.nvidia.com/u/beauy152)\
**Post date:** [May 22, 2022, 11:22pm UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/7 "2022-05-22T23:22:15Z")

</div>

Yes, you’re right, i forgot to attach the triton\_model\_repo - i have fixed that, and adjusted the file paths this time around -  
[7\_multi-inference.tar.xz](https://forums.developer.nvidia.com/uploads/short-url/bS9AEmLuljs1LSS7kMsSg42FSUb.xz) (88.5 MB)

and yes '7\_multi-inference/ensemble\_test/1 should be empty, as the ‘ensemble’ is only a configuration, which points to the other models to be used, in this case they are ‘ssd\_inception\_v2\_coco\_2018\_01\_28’ & ‘Primary\_Detector’

---

<div class="post-metadata">

**Author:** ![windy60j34](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/windy60j34/32/9748_2.png) [@windy60j34](https://forums.developer.nvidia.com/u/windy60j34)\
**Post date:** [May 25, 2022, 4:01pm UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/9 "2022-05-25T16:01:48Z")

</div>

@beauy152 ,  
Regarding ensemble models. I can see there are 2 input layers `image_tensor` + `data_0`. DS-Triton(gst-nvinferserver) support single layer input by default. For extra layers input layers, you need to follow Gst-nvinferserver manual  
[https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS\_plugin\_gst-nvinferserver.html#custom-process-interface-iinfercustomprocessor-for-extra-input-lstm-loop-output-data-postprocess](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvinferserver.html#custom-process-interface-iinfercustomprocessor-for-extra-input-lstm-loop-output-data-postprocess)  
to derive and implement interface class

> IInferCustomProcessor {  
> virtual void supportInputMemType(InferMemType& type); // return supported memory type for `extraInputs`  
> virtual bool requireInferLoop() const;  
> virtual NvDsInferStatus extraInputProcess(const vector\<IBatchBuffer\*\>& primaryInputs, vector\<IBatchBuffer\*\>& extraInputs, const IOptions\* options) = 0;  
> virtual NvDsInferStatus inferenceDone(const IBatchArray\* outputs, const IOptions\* inOptions) = 0;  
> virtual void notifyError(NvDsInferStatus status) = 0;  
> };

- Preprocess: Function `extraInputProcess` is for extra input layers processing, e.g. if `image_tensor` is primary input. then `data_0`will be taken as extra input. you need fill the correct data into `extraInputs`.
- Postprocess: If you need postprocessing, this class also has the interface `inferenceDone()` to implement customized parsing and attaching. If any function you don’t need, just `return NVDSINFER_SUCCESS`
- Example: We have examples how to do preprocess and postprocess in fasterRCNN source file for DS-Triton:

> /opt/nvidia/deepstream/deepstream-6.1/sources/objectDetector\_FasterRCNN/nvdsinfer\_custom\_impl\_fasterRCNN/nvdsinferserver\_custom\_process.cpp

Gst-nvinferserver config entry file is

> /opt/nvidia/deepstream/deepstream-6.1/sources/objectDetector\_FasterRCNN/config\_triton\_inferserver\_primary\_fasterRCNN\_custom.txt  
> The key is to make the config have following lines  
> infer\_config {  
> extra {  
> custom\_process\_funcion: “CreateInferServerCustomProcess”  
> }  
> custom\_lib {  
> path: “/path/to/libnvdsinferserver\_custom\_process.so”  
> } }

make sure function `CreateInferServerCustomProcess` implemented to create an object instance of `IInferCustomProcessor`

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [June 15, 2022, 8:00am UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/11 "2022-06-15T08:00:46Z")

</div>

**There is no update from you for a period, assuming this is not an issue anymore.  
Hence we are closing this topic. If need further support, please open a new one.  
Thanks**

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [June 29, 2022, 8:01am UTC](https://forums.developer.nvidia.com/t/deepstream-triton-ensemble-model-error/213415/12 "2022-06-29T08:01:12Z")

</div>

Closed on June 29, 2022, 8:01am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
