全部产品
Search
文档中心

DataWorks:Node PAI DLC

更新时间:Jan 14, 2026

Pelatihan terdistribusi dengan Deep Learning Containers (DLC) dari Platform for AI (PAI) menyediakan lingkungan pelatihan pembelajaran mesin yang fleksibel, andal, dan berkinerja tinggi. DataWorks menyediakan node PAI DLC yang dapat Anda gunakan untuk memuat pekerjaan DLC dan mengonfigurasi dependensi penjadwalan guna menjalankan pekerjaan sesuai jadwal.

Prasyarat

Prosedur

  1. Pada halaman pengeditan node PAI DLC, kembangkan tugas tersebut.

    Kembangkan kode tugas

    Anda dapat menulis kode pekerjaan DLC dengan salah satu cara berikut:

    Tulis kode tugas berdasarkan pekerjaan DLC yang sudah ada

    Cari pekerjaan DLC di PAI berdasarkan namanya, lalu muat pekerjaan tersebut. Setelah dimuat, editor node DLC akan menghasilkan kode node berdasarkan konfigurasi pekerjaan di PAI. Anda kemudian dapat mengedit kode tersebut.

    image

    Catatan

    Tulis kode tugas DLC secara langsung

    Di editor node PAI DLC dalam DataWorks, Anda dapat menulis kode tugas secara langsung.

    Anda dapat mengembangkan kode tugas di editor node dan mendefinisikan variabel menggunakan format ${variable_name}. Kemudian, berikan nilai pada variabel tersebut di bagian Scheduling Parameters di bawah Properties di sisi kanan halaman. Hal ini memungkinkan Anda untuk secara dinamis pass parameter ke kode dalam skenario penjadwalan. Untuk informasi selengkapnya tentang parameter penjadwalan, lihat Sumber dan ekspresi parameter penjadwalan. Kode berikut memberikan contohnya.

    dlc submit pytorchjob \    # Submit a PyTorch job using DLC.
        --name=test \    # The name of the DLC job. Use a variable name or the DataWorks node name.
        --command='echo '\''hi'\''' \    # The command to be executed for the job. In this example, the command is echo 'hi'.    
        --workspace_id=309801 \   # The workspace where the job is executed.
        --priority=1 \   # The job priority. Valid values: 1 to 9. A value of 1 indicates the lowest priority, and a value of 9 indicates the highest priority.
        --workers=1 \    # The number of task nodes. If the value is greater than 1, the job is a distributed task and can be concurrently run on multiple nodes.
        --worker_image=<image> \   # The path of the image for the worker to run.
        --image_repo_username=<username> \   # Provide authorization for the private image.
        --image_repo_password=<password> \   # Provide authorization for the private image.
        --data_source_uris=oss://oss-cn-shenzhen.aliyuncs.com/::/mnt/data/:{mountType:jindo} \   # Mount the Object Storage Service (OSS) data source to a specified path in the container. In this example, the mount type is jindo.
        --worker_spec=ecs.g6.xlarge   # The node configuration, which is the specification of the compute node to use. 
  2. Setelah mengembangkan kode tugas, konfigurasikan dan jalankan node tersebut.

    1. Pada bagian Run Configurations, konfigurasikan Resource Group.

      Pilih kelompok sumber daya penjadwalan yang dapat terhubung ke sumber data. Untuk informasi selengkapnya, lihat Solusi konektivitas jaringan.

    2. Pada bilah alat, klik Run untuk menjalankan tugas node.

  3. Untuk menjalankan tugas node sesuai jadwal, konfigurasikan properti penjadwalannya. Untuk informasi selengkapnya, lihat Konfigurasi properti penjadwalan untuk node.

  4. Setelah mengonfigurasi node, Anda harus menerbitkannya. Untuk informasi selengkapnya, lihat Terbitkan node atau alur kerja.

  5. Setelah node diterbitkan, Anda dapat melihat status running tugas yang dipicu otomatis di Operation Center. Untuk informasi selengkapnya, lihat Memulai Operation Center.