Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

On this page
Help Center/ ModelArts/ Troubleshooting/ Inference Deployment/ Service Deployment/ Failed to Deploy a Service and Error "No Module named XXX" Occurred

Failed to Deploy a Service and Error "No Module named XXX" Occurred

Updated on 2024-06-11 GMT+08:00

Symptom

Deploying a service failed. The system displays error message "No Module named XXX".

Possible Causes

"No Module named XXX" indicates that the dependency module is not imported to the model.

Solution

Import the required dependency module to the model through inference code.

For example, when you attempt to deploy a PyTorch AI application as a real-time service, the system displays error message "ModuleNotFoundError: No module named 'model_service.tfserving_model_service'". In this case, configure "from model_service.pytorch_model_service import PTServingBaseService" in customize_service.py. Example code:

import log
from model_service.pytorch_model_service import PTServingBaseService
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback