-
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
unable to load custom python environment with python backend #3480
Comments
What is the Triton version that you are using? |
Thank you @Tabrizian ! By updating the triton version to 21.09 has solved the original problem, but now I'm encountered another problem that the server doesn't start . Below are the details of the setup and error, appreciate your help! we are trying to deploy the 21.09 version using Kubernetes - however when pulling the image and trying to run it we get the following issues:
The error for the above command is:
When we try to run it using the following command:
Instead of running the server it prints out:
|
I think you need to wait long enough. Since your execution environment can be very large and sometimes it is required to download the environment from S3. |
@Tabrizian We've waited for a long time (hours) it still stuck at the same place, no more print. Wondering if it has to do with the custom environment as when we remove the customized environment it went through till loading models. With the custom environment it ends at the above message. |
@Tabrizian To provide more context, It's a Dectectron2 model, we are also trying to serve it with the PyTorch backend while trying to figure out the python backed.
Following this answer here #2025 (comment)
returns this error
the error message above looks asking for one tensor input instead a tuple of two inputs. If I skip this dummy wrapper and use the traced model for inference directly, I'll get this error which indicate it needs two inputs
Thank you ! |
@CoderHam Could you help with how they can serve it with PyTorch backend? @stellaywu Can you provide all the details about how you created the environment so that we can look into it? |
@stellaywu would you need to trace / script your model. Why do you need to create the wrapper for your model before scripting / tracing it? |
@CoderHam thanks for replying ! I have traced the model before creating the wrapper. The traced model is the input for the wrapper. traced_pytorch_model_ckpt.pt is the traced model. |
@Tabrizian Appreciate your help so far. We installed the custom packages using The We then set the cuda root directory using:
And then we followed the steps outlined in the documentation here. |
@arshiamalek We have not tested the Custom Python Execution Environments with GCS. We have only tested this with Amazon S3 so there could be issues with this. Have you tried not using the GCS to see whether it works or not? I have filed a ticket to add testing for GCS. |
@CoderHam I managed to got over the original issue and make the model inference on Triton with pytorch backend. However the inference result is quite different from Triton vs direct inference with the original PyTorch model. The scripted model is created following this code on Detectron repo . Could you please help with identifying what could be the cause? |
@CoderHam I'm having another issue when running the deployment on Triton GPU similar to this issue #2024 I'm using the 21.09 triton, the traced model is able to run outside of triton. Here is the full trace. Appreciate your help!
|
@Tabrizian One issue when we are adding our custom python backend stub is this:
This is thrown when we create a custom backend stub outlined here. We are on triton version |
Did you run the model using the PyTorch C API (libtorch) or the Python API? Since Triton uses the C API, we want to ensure we are making an apples to apples comparison. |
@arshiamalek Have you build the triton_python_backend_stub using the correct branch? You need to clone the |
@Tabrizian Yes I used the r21.09 branch |
Can you open a separate issue and put all the details there (i.e. your model repository, your client, the steps you followed to build the Custom Python Execution Environment)? Thanks |
@Tabrizian made a new issue #3495, thanks for your help! |
@Tabrizian I gave it another try with python backend on GPU, produced the I used these command in my yaml to start the triton server We also tried to start the triton pod and start the server with the above command within the pod get same results. I can see the files in my triton server pod for the python backend model
The triton server didn't throw any error message but hangs with this message at the end
Any suggestions? Thanks! |
There is a known issue in Python backend with regard to the polling mode. Does it work properly when you do not use the |
thanks for replying @Tabrizian tried with
|
Strange.. As I mentioned earlier, we have not tested Execution Environments with GCS in Python backend. I have filed a ticket to add testing for it. cc @msalehiNV |
@Tabrizian Can you attach appropriate labels to this issue and link it to the ticket you have created? |
Closing this issue due to its age and inactivity. Triton has changed a lot in the last two years. There was also a recent feature added that now allows custom execution environments here, if helpful. For any issues in Triton's recent releases, please open a new issue following the bug template. We need clear steps to reproduce your issue, including models and filed needed. If you cannot share your model, feel free to use a sample model which reproduces the same issue. |
I'm trying to use a custom environment for a pytorch model served with the python backend
this is the config file
The file structure is like this
I'm getting the error
UNAVAILABLE: Internal: Failed to get the canonical path for $$TRITON_MODEL_DIRECTORY/model1/python-3-8.tar.gz.
Please help !
The text was updated successfully, but these errors were encountered: