Why can't the renamed "triton_python_backend_utils.py" and other modules be imported in models directory?
See original GitHub issueHello
this worked fine from your example :
but when i renamed the triton_python_backend_utils.py file to :
in model.py
import utility as pb_utils
got an error :
ModuleNotFoundError: No module named 'utility'
this also happens when i want to import my
own modules , for example here
i get
ModuleNotFoundError: No module named 'process_1'
I note that i just copied those files directly into docker volume and left python_backend_main folder out of it :
docker run --gpus=all --shm-size=1g --ulimit memlock=-1 -p 8000:8000 -p 8001:8001 -p 8002:8002 -v $PWD/models:/models --ulimit stack=67108864 -ti tritonserver:20.10-py3
# tritonserver --model-repository /models
where i used dockerfile :
FROM nvcr.io/nvidia/tritonserver:20.10-py3
RUN pip3 install --upgrade --no-cache-dir \
torchvision
So where else should i put those new modules ?
Another issue , what should i do if my pytorch script
additionally loads pre-trained *.pt
file ? here is the case :
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The fix is not available in the 20.11 release. It has been fixed in the 20.12 release.
Hi @Tabrizian ,
In which version this bug has been fixed ? I am running triton version 2.5.0 from container 20.11 and i am still struggling importing custom python modules from
model.py
As I am deploying Triton on GKE I cannot upgrade Triton to the very latest version.