Creating a Training Experiment
Function
This API is used to create an experiment category on ModelArts.
This API is used when you need to add the training job to an experiment category for easy management. Use this API when there are multiple task versions. Before using this API, ensure that you have logged in to ModelArts and have the permission to create training experiments. After the creation is complete, the system returns the details of the training experiment, including the experiment ID and the total number of training jobs in the experiment. If you do not have the permission to perform operations, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v2/{project_id}/training-experiments
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| metadata | Yes | Definition: Parameters for creating a training experiment. Constraints: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Definition: Experiment name. Constraints: The value can contain at most 64 characters. Special characters are not allowed. Range: N/A Default Value: N/A |
| description | No | String | Definition: Description. Constraints: The value can contain at most 256 characters. Special characters are not allowed. Range: N/A Default Value: N/A |
| workspace_id | No | String | Definition: Workspace ID. Constraints: N/A Range: N/A Default Value: 0 |
Response Parameters
Status code: 201
| Parameter | Type | Description |
|---|---|---|
| metadata | Definition: Training experiment data. | |
| statistic | TrainingExperimentStatistic object | Definition: Statistics of the training experiment. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition: Experiment name. Range: N/A |
| description | String | Definition: Description. Range: N/A |
| workspace_id | String | Definition: Workspace ID. Range: N/A |
| create_time | Long | Definition: Creation time. Range: N/A |
| update_time | Long | Definition: Update time. Range: N/A |
| id | String | Definition: Experiment ID. Range: N/A |
Example Requests
The following is an example of creating a training experiment.
POST https://{endpoint}/v2/{project_id}/training-experiments
{
"metadata" : {
"name" : "test",
"description" : "demo",
"workspace_id" : "0"
}
} Example Responses
Status code: 201
OK
{
"metadata" : {
"id" : "6ccc15e6-8a81-4d8e-8bee-53401d850639",
"name" : "test",
"description" : "demo",
"create_time" : 1731552542622,
"workspace_id" : "0",
"update_time" : 1731552542000
},
"statistic" : {
"job_count" : 0
}
} Status Codes
| Status Code | Description |
|---|---|
| 201 | OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot