Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Processing Task

Updated on 2024-05-30 GMT+08:00

Function

This API is used to create a processing task, including feature analysis tasks and data processing tasks. You can specify the id field of template composite parameter in the request body to create a task.

  • During data feature analysis, images or target bounding boxes are analyzed based on image features, such as blurs and brightness to draw visualized curves to assist in dataset processing.

  • Data processing is used to extract valuable data from a large amount of disordered, difficult-to-understand data. Data processing includes data validation, data cleansing, data selection, and data augmentation.

  • Data validation indicates that the dataset is verified to ensure data accuracy.

  • Data cleansing refers to the process of denoising, correcting, or supplementing data.

  • Data selection indicates the process of selecting data subsets from full data.

  • Data augmentation indicates that data volume is increased through simple data amplification operations such as scaling, cropping, transformation, and composition.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST /v2/{project_id}/processor-tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

create_version

No

Boolean

Whether to synchronously create a task version when creating a task. Set this parameter to true only when creating a data processing task. For other types of tasks, this parameter is set to false or left blank. Options:

  • true: Create a task version when creating a task.

  • false: Do not create a task version when creating a task. (Default value)

data_source

No

ProcessorDataSource object

Data source. Either this parameter or inputs is used. A data source path cannot be an OBS path in a KMS-encrypted bucket.

description

No

String

Description of a data processing task. The description contains 0 to 256 characters and does not support the following special characters: ^!<>=&"'

inputs

No

Array of ProcessorDataSource objects

Data sources. Either this parameter or data_source is used. A data source path cannot be an OBS path in a KMS-encrypted bucket.

name

Yes

String

Name of a data processing task.

template

Yes

TemplateParam object

Data processing template, such as the algorithm ID and parameters.

version_id

No

String

Dataset version ID.

work_path

No

WorkPath object

Work directory of a data processing task. A work directory cannot be an OBS path in a KMS-encrypted bucket.

workspace_id

No

String

Workspace ID. If no workspace is created, the default value is 0. If a workspace is created and used, use the actual value.

Table 3 ProcessorDataSource

Parameter

Mandatory

Type

Description

name

No

String

Dataset name.

source

No

String

Data source path. Options:

  • If type is set to OBS, source is an OBS path.

  • If type is set to TASK, source is a task ID.

  • If type is set to DATASET, source is a dataset ID.

  • If type is set to CUSTOM and the API is called by resource tenants, set source to the project_id of the actual user. Otherwise, this field is left blank.

type

No

String

Data source type. Options:

  • OBS: Data obtained from OBS

  • TASK: Data processing task

  • DATASET: Dataset

  • CUSTOM: Data called by resource tenants

version_id

No

String

Version of a dataset.

version_name

No

String

Dataset version name.

Table 4 TemplateParam

Parameter

Mandatory

Type

Description

id

No

String

Task type, which is the ID of a data processing template. Options:

  • sys_data_analyse: feature analysis

  • sys_data_cleaning: data cleansing

  • sys_data_augmentation: data augmentation

  • sys_data_validation: data validation

  • sys_data_selection: data filtering

name

No

String

Template name.

operator_params

No

Array of OperatorParam objects

Operator parameter list.

Table 5 OperatorParam

Parameter

Mandatory

Type

Description

advanced_params_switch

No

Boolean

Advanced parameter switch.

id

No

String

ID of an operator.

name

No

String

Name of an operator.

params

No

Object

Operator parameter. The parameter type is map<string,object>. Currently, object only supports the types of Boolean, Integer, Long, String, List[/topic/body/section/table/tgroup/tbody/row/entry/p/br {""}) (br] and Map<String,String>. For two special scenarios of object detection and image classification in a data preprocessing task, the value of task_type is object_detection or image_classification.

Table 6 WorkPath

Parameter

Mandatory

Type

Description

name

No

String

Dataset name.

output_path

No

String

Output path, for example, /datasets/demo.

path

No

String

Working path. Options:

  • If type is set to OBS, source is an OBS path.

  • If type is set to DATASET, source is a dataset ID.

type

No

String

Type of a working path. Options:

  • OBS: OBS path

  • DATASET: dataset

version_id

No

String

Version of a dataset.

version_name

No

String

Name of a dataset version. The value can contain 0 to 32 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.

Response Parameters

Status code: 200

Table 7 Response body parameters

Parameter

Type

Description

task_id

String

ID of a data processing task.

Example Requests

  • The following is an example of how to create a feature analysis task. The task type has been set to sys_data_analyse.

    {
      "name" : "V001",
      "description" : "",
      "data_source" : {
        "type" : "DATASET",
        "source" : "X6c3N3eztX7cr3Arvqu"
      },
      "template" : {
        "id" : "sys_data_analyse",
        "operator_params" : [ {
          "id" : "sys_data_analyse",
          "params" : {
            "op_list" : [ ]
          }
        } ]
      },
      "version_id" : "J4Eh2FDEWH1qnDlD3hQ"
    }
  • The following is an example of how to create a data processing (data validation) task. The task type has been set to sys_data_validation.

    {
      "name" : "PRE-e77c",
      "inputs" : [ {
        "type" : "DATASET",
        "source" : "PYc9H2HGv5BJNwBGXyK",
        "version_id" : "yoJ5ssClpNlOrsjjFDa"
      } ],
      "work_path" : {
        "type" : "DATASET",
        "path" : "PYc9H2HGv5BJNwBGXyK",
        "version_name" : "V0010"
      },
      "description" : "",
      "create_version" : true,
      "template" : {
        "id" : "sys_data_validation",
        "operator_params" : [ {
          "name" : "MetaValidation",
          "advanced_params_switch" : false,
          "params" : {
            "task_type" : "image_classification",
            "dataset_type" : "manifest",
            "source_service" : "select",
            "filter_func" : "data_validation_select",
            "image_max_width" : "1920",
            "image_max_height" : "1920",
            "total_status" : "[0,1,2]"
          }
        } ]
      },
      "workspace_id" : "0"
    }
  • The following is an example of how to create a data processing (data cleansing) task. The task type has been set to sys_data_cleaning.

    {
      "name" : "PRE-330f",
      "inputs" : [ {
        "type" : "DATASET",
        "source" : "gfghHSokody6AJigS5A",
        "version_id" : "54IXbeJhfttGpL46lbv"
      } ],
      "work_path" : {
        "type" : "DATASET",
        "path" : "gfghHSokody6AJigS5A",
        "version_name" : "V004"
      },
      "description" : "",
      "create_version" : true,
      "template" : {
        "id" : "sys_data_cleaning",
        "operator_params" : [ {
          "name" : "PCC",
          "advanced_params_switch" : false,
          "params" : {
            "task_type" : "image_classification",
            "dataset_type" : "manifest",
            "source_service" : "select",
            "filter_func" : "data_cleaning_select",
            "prototype_sample_path" : "obs://test-obs/classify/data/animals/",
            "criticism_sample_path" : "",
            "n_clusters" : "auto",
            "simlarity_threshold" : "0.9",
            "embedding_distance" : "0.2",
            "checkpoint_path" : "/home/work/user-job-dir/test-lxm/resnet_v1_50",
            "total_status" : "[0,2]",
            "do_validation" : "True"
          }
        } ]
      },
      "workspace_id" : "0"
    }
  • The following is an example of how to create a data processing (data filtering) task. The task type has been set to sys_data_selection.

    {
      "name" : "PRE-aae5",
      "inputs" : [ {
        "type" : "DATASET",
        "source" : "gLNSdlQ1iAAmPgl0Won",
        "version_id" : "WAVPSYpKE3FggbgRxiK"
      } ],
      "work_path" : {
        "type" : "DATASET",
        "path" : "gLNSdlQ1iAAmPgl0Won",
        "version_name" : "V003"
      },
      "description" : "",
      "create_version" : true,
      "template" : {
        "id" : "sys_data_selection",
        "operator_params" : [ {
          "name" : "SimDeduplication",
          "advanced_params_switch" : false,
          "params" : {
            "task_type" : "image_classification",
            "dataset_type" : "manifest",
            "source_service" : "select",
            "filter_func" : "data_deduplication_select",
            "simlarity_threshold" : "0.9",
            "total_status" : "[0,2]",
            "do_validation" : "True"
          }
        } ]
      },
      "workspace_id" : "0"
    }
  • The following is an example of how to create a data processing (data augmentation) task. The task type has been set to sys_data_augmentation.

    {
      "name" : "PRE-637c",
      "inputs" : [ {
        "type" : "DATASET",
        "source" : "XGrRZuCV1qmMxnsmD5u",
        "version_id" : "kjPDTOSi6BQqhtXZlFv"
      } ],
      "work_path" : {
        "type" : "DATASET",
        "path" : "XGrRZuCV1qmMxnsmD5u",
        "version_name" : "V002"
      },
      "description" : "",
      "create_version" : true,
      "template" : {
        "id" : "sys_data_augmentation",
        "operator_params" : [ {
          "name" : "AddNoise",
          "advanced_params_switch" : false,
          "params" : {
            "task_type" : "image_classification",
            "dataset_type" : "manifest",
            "AddNoise" : "1",
            "noise_type" : "Gauss",
            "loc" : "0",
            "scale" : "1",
            "lam" : "2",
            "p" : "0.01",
            "total_status" : "[3]",
            "filter_func" : "data_augmentation",
            "do_validation" : "True"
          }
        } ]
      },
      "workspace_id" : "0"
    }

Example Responses

Status code: 200

OK

{
  "task_id" : "SNEJua7qdZZN8GvkcEr"
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback