Help Center/ ModelArts/ FAQs/ Training Jobs/ Compiling the Training Code/ Why Can't I Use os.system ('cd xxx') to Access the Corresponding Folder During Job Training?
Updated on 2022-12-06 GMT+08:00

Why Can't I Use os.system ('cd xxx') to Access the Corresponding Folder During Job Training?

If you cannot access the corresponding folder by using os.system('cd xxx') in the boot script of the training job, you are advised to use the following method:

import os
os.chdir('/home/work/user-job-dir/xxx')