Creating an Auto Search Job
Prerequisites
- Data has been prepared. Specifically, you have created an available dataset in ModelArts, or you have uploaded the dataset used for the auto search job to the OBS directory.
- You have prepared the code and configuration file for the auto search job and uploaded them to the OBS directory. For details about the AutoSearch code compilation specifications, see Code Compilation Specifications. For details about the compilation specifications of the YAML configuration file, see YAML Configuration File Description.
- At least two empty folders have been created on OBS for storing the search results and job logs.
- The account is not in arrears because resources are consumed when training jobs are running.
- The OBS directory you use and ModelArts are in the same region.
Background
- The AI engine for auto search jobs can only be AutoSearch-python3.6. AutoSearch-python3.6 is an engine provided by ModelArts, with the TensorFlow 1.13.1 or PyTorch 1.0.0 engine preset. You need to use the APIs of TensorFlow and PyTorch in the right version when compiling code for an auto search job.
Creating an Auto Search Job
- Log in to the ModelArts management console. In the left navigation pane, choose Training Management > Auto Search Jobs. The Auto Search Jobs page is displayed.
- In the upper left corner of the auto search job list, click Create to switch to the Create Auto Search Job page.
- Set related parameters and click Next.
- Enter basic information, including Billing Mode, Name, Version, and Description. Currently, Billing Mode supports only Pay-per-use. The Version is automatically generated and named by the system in the ascending order of V001, V002, and so on. You cannot manually modify it.
Specify Name and Description according to actual requirements.Figure 1 Basic information about an auto search job
- Set the auto search job parameters, including the data source, algorithm source, and more. For details, see Table 1.
Figure 2 Setting job parameters
Table 1 Auto search job parameters Parameter
Description
One-Click Configuration
If you have saved job parameter configurations in ModelArts, click One-Click Configuration and select an existing job parameter configuration as prompted to quickly complete parameter setting for the job.
Data Source (Dataset)
Select an available dataset and its version from the ModelArts Data Management module.
- Dataset: Select an existing dataset from the drop-down list. If no dataset is available in ModelArts, no result will be displayed in the drop-down list.
- Version: Select a version according to the Dataset setting.
Data Source (Data path)
Select the training data from your OBS bucket. On the right of the Data path text box, click Select. In the dialog box that is displayed, select an OBS folder for storing data.
AI Engine
The AI engine for auto search jobs can be AutoSearch-python3.6 or Autosearch-Ascend-Powered. The latter is used to search for resources on Ascend 910. By default, the common Python 3.6 environment is used to compile code.
Select Storage Path
Select an OBS path for storing the AutoSearch code file. Set this parameter to the directory where the Boot File is located.
Boot File
Select the boot file of the AutoSearch code, whose name ends with .py.
Search Result Export Path
Select a path for storing job output results. You are advised to select an empty directory. Do not select the directory used for storing the dataset for Search Result Export Path.
Running Parameter
Set the key running parameters in code. Ensure that the parameter names are the same as those in code. The AutoSearch-python3.6 engine has many built-in running parameters, as listed in Table 4. These parameters are automatically sent to the service when the job is started. Set mandatory parameters during job creation. For custom parameters in the code, you also need to add the running parameters and their values here for job running.
For example, max_steps = 10, where max_steps is a passing parameter in code.
Select Job Log Path
Select a path for storing log files generated during job running. Click Select to select a directory from OBS as the log output path. You can also click Clear to delete the configured path.
- Select resources used for the auto search job. Resources used for auto search jobs are limited. Only part of resource flavors are provided here. Resource-related parameters have been set based on the supported flavors and do not need to be modified. For details, see Table 2.
Figure 3 Selecting resources
Table 2 Resource parameters Parameter
Description
Resource Pool
Select resource pools for the job. Currently, only public resource pools can be selected for auto search jobs. AutoSearch-python3.6 supports only GPU specifications (CPU: 8 vCPUs 64 GiB GPU: nvidia-v100 32 GiB), and Autosearch-Ascend-Powered supports only NPU specifications.
Compute Nodes
Set the number of compute nodes. If the number of nodes is set to 1, the background computing is in a single-node mode. Currently, only the single-node mode is supported.
- Configure the subscription function and set whether to save the parameter settings of the auto search job.
Figure 4 Configuring the subscription function
Table 3 Parameters related to the subscription function and parameter configuration saving Parameter
Description
Notification
Select the resource pool status to be monitored from the event list, and SMN sends a notification message when the event occurs.
This parameter is optional. You can choose whether to enable subscription based on actual requirements. If you enable subscription, set the following parameters as required:
- Topic: indicates the topic name. You can refer to Create Topic to create a topic on the SMN console.
- Event: indicates the event to be subscribed to. The options are OnJobRunning, OnJobSucceeded, and OnJobFailed, indicating that training is in progress, successful, and failed, respectively.
Save Training Parameters
If you select this option, the parameter settings of the current job will be saved to facilitate subsequent job creation.
Select Save Training Parameters and specify Configuration Name and Description. After a training job is created, you can switch to the Job Parameters tab page to view your saved job parameter configuration. For details, see Managing Job Parameters.
- After setting the parameters, click Next.
- Enter basic information, including Billing Mode, Name, Version, and Description. Currently, Billing Mode supports only Pay-per-use. The Version is automatically generated and named by the system in the ascending order of V001, V002, and so on. You cannot manually modify it.
- On the displayed Confirm page, confirm that the information is correct and click Next. Generally, auto search jobs run for a period of time, which may be several minutes or tens of minutes depending on the amount of your selected data and resources.
The auto search job starts immediately after being created.
You can switch to the auto search job list to view the job's basic information. The Status of the newly created job is Initializing. If the status changes to Successful, the job ends and the output result is stored in the location specified by Search Result Export Path. If the Status of the job changes to Runing failed, click the job name to enter the job details page, and view the job logs to troubleshoot faults.
Preset Running Parameters and API Reference
|
Parameter |
Mandatory |
Type |
Meaning |
|---|---|---|---|
|
config_path |
Yes |
string |
Configuration file path (OBS path) of an auto search job. The OBS path must start with obs://. |
|
train_url |
Yes |
string |
Path for saving the search result. If you have set the Search Result Export Path parameter, the system automatically generates this parameter and its value. |
|
Search Space |
ModelArts AutoSearch API |
Input Parameter |
Description |
|---|---|---|---|
|
reporter |
autosearch.reporter |
Any metric, such as accuracy and latency |
Example: autosearch.reporter(accuracy=foo, loss=bar) For details, see the code in each example. |
|
config |
autosearch.config |
- |
Parameters passed by the AutoSearch framework to the training code |
Follow-Up Procedure
For auto search jobs, you can manage versions, stop or delete jobs, view job details, and manage job parameters. The operations are similar to those of training jobs. For details, see the operation guide of the training jobs. Different from training jobs, auto search jobs do not support creation and management of visualization jobs.
- Stopping or deleting a job: The procedure is similar to that of a training job. For details, see the operation guide in Stopping or Deleting a Job.
- Managing job versions: The procedure is similar to that of a training job. For details, see the operation guide in Managing Training Job Versions.
- Viewing job details: The procedure is similar to that of a training job. For details, see the operation guide in Viewing Job Details.
- Managing job parameters: The procedure is similar to that of a training job. For details, see the operation guide in Managing Job Parameters.
Last Article: Introduction to Auto Search Jobs
Next Article: Code Compilation Specifications
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.