Updated on 2025-05-29 GMT+08:00

Code Directory

Description

OBS path for storing the algorithm code. The files required for training, such as the training code, dependence installation packages, and pre-generated models, are uploaded to the code directory.

The code directory cannot contain irrelevant files or directories. Otherwise, uploading data may fail.

Do not store training data in the code directory. When the training job starts, the data stored in the code directory will be downloaded to the backend. A large amount of training data may lead to a download failure.

After you create the training job, ModelArts downloads the code directory and its subdirectories to the training container.

Take OBS path obs://obs-bucket/training-test/demo-code as an example. The content in the OBS path will be automatically downloaded to ${MA_JOB_DIR}/demo-code in the training container, and demo-code (customizable) is the last-level directory of the OBS path.

  • Any programming language is supported.
  • The number of files (including files and folders) cannot exceed 1,000.
  • The total file size cannot exceed 5 GB.

FAQs