Updated on 2025-06-16 GMT+08:00

Creating a Ray Job

Prerequisites

  • You have a valid Huawei Cloud account.
  • You have at least one workspace available.
  • You have at least one Ray cluster available.
  • You have developed job-related code based on service requirements and uploaded the code to OBS. (For details, see Creating a Bucket.)

Procedure

  1. Log in to Workspace Management Console.
  2. Select the created workspace, click Access Workspace, and choose Development and Production > Jobs.
  3. Click Create Job in the upper right corner. Set required parameters by referring to Table 1. Set Job Type to Ray and other parameters as required. The Ray main file is the main entry file of the job you have developed.

    Table 1 Parameters for creating a job

    Parameter

    Description

    Job Name

    Name of the job to be created.

    Job Type

    The default value is Ray.

    Code Directory

    Select the OBS directory where the job code is stored.

    Ray Main File

    Select the main entry Python file of the job running code in the code directory. Ensure that you have selected the main entry file for running the job. Otherwise, the job running may not meet your expectation.

    NOTE:

    Do not enter sensitive information in the script or print sensitive information through the script.

    Ray Job Parameters

    Parameters required for executing the Ray main file. The following is an example:

    ["--class","org.ray.examples.rayTest","10","model_2","20"]
    NOTE:

    Do not enter sensitive information in the script or print sensitive information through the script.

    Dependencies

    Software and its version on which the Ray job depends. Before the Ray job is executed, the dependency is installed using pip. The format is specified in the requirements.txt file. Example:

    numpy==1.24.3

    Ray Clusters

    Target Ray cluster where the job is executed.

    Version

    Job version.

    Version Description

    Version description, which contains a maximum of 1000 characters.