Help Center/ ModelArts/ Troubleshooting/ Inference Deployment/ Model Management/ Failed to Obtain the Directory Structure in the Target Image When Creating a Model Through OBS
Updated on 2025-06-06 GMT+08:00

Failed to Obtain the Directory Structure in the Target Image When Creating a Model Through OBS

Symptom

When a user creates a model, customized files and folders are stored in the OBS directory specified by a meta model source, and these files and folders will be copied to the target image. However, the user is unclear about the path to the copied files and folders.

Possible Causes

When a model is imported through OBS, ModelArts copies all files and folders in the specified OBS directory to a path specified in the image. You can obtain the path in the image by using self.model_path.

Solution

For details about how to obtain the path in an image, see Specifications for Model Inference Coding.