server
server copied to clipboard
Python backend cannot import Tensor
Description
Python backend model import Tensor
from triton_python_backend_utils import Tensor
Got error:
UNAVAILABLE: Internal: ImportError: cannot import name 'Tensor' from 'triton_python_backend_utils' (/opt/tritonserver/backends/python/triton_python_backend_utils.py
Triton inference server version 22.05 still work well
If import from c_python_backend_utils
it work
Triton Information Triton inference server version 22.07
To Reproduce Steps to reproduce the behavior.
Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well).
Expected behavior A clear and concise description of what you expected to happen.
Hi @Tabrizian, do you know if from triton_python_backend_utils import Tensor
import is supported in the Python backend?
@kthui @Tabrizian any update for this issue
@Phelan164 Sorry for delay in responding to this thread. Importing Tensor
from triton_python_backend_utils
is not supported before initialize
function is called. We can fix this issue in Python models. I'll file a ticket for the same.
@Tabrizian thanks for your information.
Hi is this issue fixed, I still cannot run from triton_python_backend_utils import Tensor
in nvcr.io/nvidia/tritonserver:22.12-py3
?
Related issue: https://github.com/triton-inference-server/server/issues/6535
Ref: 4234