Help Center>
ModelArts>
FAQs>
Training Jobs>
Compiling the Training Code>
What Is the File Path If a File in the model Directory Is Referenced in a Custom Python Package?
Updated on 2023-01-11 GMT+08:00
What Is the File Path If a File in the model Directory Is Referenced in a Custom Python Package?
To obtain the actual path to a file in a container, use Python.
os.getcwd() # Obtain the current work directory (absolute path) of the file. os.path.realpath(__ file __) # Obtain the absolute path of the file.
You can also use other methods of obtaining a file path through the search engine and use the obtained path to read and write the file.
Parent topic: Compiling the Training Code
Compiling the Training Code FAQs
- How Do I Create a Training Job When a Dependency Package Is Referenced by the Model to Be Trained?
- What Is the Common File Path for Training Jobs?
- How Do I Install a Library That C++ Depends on?
- How Do I Check Whether a Folder Copy Is Complete During Job Training?
- How Do I Load Some Well Trained Parameters During Job Training?
- How Do I Obtain Training Job Parameters from the Boot File of the Training Job?
- Why Can't I Use os.system ('cd xxx') to Access the Corresponding Folder During Job Training?
- How Do I Invoke a Shell Script in a Training Job to Execute the .sh File?
- How Do I Obtain the Dependency File Path to be Used in Training Code?
- What Is the File Path If a File in the model Directory Is Referenced in a Custom Python Package?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore