Help Center/ ModelArts/ FAQs/ ModelArts Standard Inference Deployment/ How Do I Prevent Python Dependency Package Conflicts in a Custom Prediction Script When Deploying a Real-Time Service in ModelArts?
Updated on 2025-08-28 GMT+08:00

How Do I Prevent Python Dependency Package Conflicts in a Custom Prediction Script When Deploying a Real-Time Service in ModelArts?

Before importing a model, save the inference code and configuration file in the model folder. When coding with Python, import custom packages in relative import (Python import) mode.

If there are packages with duplicate names in the ModelArts inference framework code and they are imported not in relative import mode, a conflict will occur, leading to a service deployment or prediction failure.