langchain/libs/partners/nvidia-trt
Mikhail Khludnev 14ff1438e6
nvidia-trt[patch]: propagate InferenceClientException to the caller. (#16936)
- **Description:**  
 
before the change I've got

1. propagate InferenceClientException to the caller.
2. stop grpc receiver thread on exception 

```
        for token in result_queue:
>           result_str += token
E           TypeError: can only concatenate str (not "InferenceServerException") to str

../../langchain_nvidia_trt/llms.py:207: TypeError
```
And stream thread keeps running. 

after the change request thread stops correctly and caller got a root
cause exception:

```
E                   tritonclient.utils.InferenceServerException: [request id: 4529729] expected number of inputs between 2 and 3 but got 10 inputs for model 'vllm_model'

../../langchain_nvidia_trt/llms.py:205: InferenceServerException
```

  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
  - **Twitter handle:** [t.me/mkhl_spb](https://t.me/mkhl_spb)
 
I'm not sure about test coverage. Should I setup deep mocks or there's a
kind of triton stub via testcontainers or so.
2024-02-06 11:47:07 -08:00
..
docs [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
langchain_nvidia_trt nvidia-trt[patch]: propagate InferenceClientException to the caller. (#16936) 2024-02-06 11:47:07 -08:00
scripts [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
tests Fix: fix partners name typo in tests (#15066) 2023-12-22 11:48:39 -08:00
.gitignore [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
LICENSE [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
Makefile [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
mypy.ini [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00
poetry.lock nvidia-trt: remove tritonclient all extra dep (#16749) 2024-01-30 16:06:19 -08:00
pyproject.toml nvidia-trt: remove tritonclient all extra dep (#16749) 2024-01-30 16:06:19 -08:00
README.md [Partner] NVIDIA TRT Package (#14733) 2023-12-18 19:08:25 -08:00

langchain-nvidia-trt