All Products
Search
Document Center

Platform For AI:Submit a PyTorch training job

Last Updated:Mar 09, 2026

Submit a PyTorch transfer learning training job in Deep Learning Containers (DLC).

Step 1: Prepare data

The training data is pre-stored in a public storage medium. Download the data directly without additional preparation.

Step 2: Prepare training code and model storage file

The training code package is pre-stored in a public storage medium. Download the code package directly without additional development.

Step 3: Create a job

  1. Go to the Create Job page.

    1. Log on to the PAI console. Select a region and a workspace. Then, click Enter Deep Learning Containers (DLC).

    2. On the Deep Learning Containers (DLC) page, click Create Job.

  2. On the Create Job page, configure the parameters listed in the following table. Use default values for the remaining parameters.

    image

    Parameter

    Description

    Basic Information

    Job Name

    Enter a job name. Example: torch-sample.

    Environment Information

    Image config

    Click Alibaba Cloud Image and select a PyTorch image.

    Mount dataset

    To save training results to your local machine, mount a custom dataset and save results to the dataset's file system. For an OSS dataset, click Custom Dataset and configure the following parameters:

    • Custom Dataset: Select a created OSS dataset. For information about creating datasets, see Create and manage datasets.

    • Mount Path: Set to /mnt/data/.

    Startup Command

    Enter the following command to download data, download code package, run training jobs, check models, and save training results to the mounted dataset:

    wget https://pai-public-data.oss-cn-beijing.aliyuncs.com/hol-pytorch-transfer-cv/data.tar.gz && tar -xf ./data.tar.gz && mv ./hymenoptera_data/ ./input && mkdir output && wget https://pai-public-data.oss-cn-beijing.aliyuncs.com/hol-pytorch-transfer-cv/main.py && python main.py -i ./input -o ./output && ls ./output && cp -r ./output /mnt/data

    Resource Information

    Source

    Select Public Resources.

    Framework

    Select PyTorch.

    Job Resource

    • Quantity: Set to 1.

    • Resource Type: Click image and select an instance type (e.g., ecs.gn6e-c12g1.3xlarge). If the type is unavailable in your current region, create a job in another region. For information about regions supporting pay-as-you-go billing, see Distributed Training (DLC).

  3. Click OK.

    The Deep Learning Containers (DLC) page appears.

Step 4: View training job details and logs

  1. On the Deep Learning Containers (DLC) page, click the job name.

  2. On the job details page, view Basic Information and Resource Information.

  3. In the Instance section at the bottom of the job details page, find the desired node and click Log in the Actions column to view node logs.

    image

  4. Go to the mounted dataset file system to view results. For OSS:

    image