Help Center/ ModelArts/ FAQs/ ModelArts Standard Model Training/ How Do I Obtain the Actual File Path in a Training Container in ModelArts?
Updated on 2025-08-28 GMT+08:00

How Do I Obtain the Actual File Path in a Training Container in ModelArts?

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.