All Products
Search
Document Center

Platform For AI:GetHpoTrial

Last Updated:Oct 21, 2025

Queries information about a trial in a hyperparameter optimization (HPO) experiment.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
paiautoml:GetHpoTrialget
*All Resources
*
    none
none

Request syntax

GET /api/automl/v1/hpo/experiment/{ExpId}/trial/{TrialId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ExperimentIdstringYes

The ID of the experiment.

abcde
TrialIdstringYes

trial id

mf99W4

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the POP request.

3F190916-B3E5-5D1E-AD0C-35C0DF105F51
Codestring

The internal error code. This parameter is returned if an exception occurred.

INVALID_INPUT_PARAMS
Messagestring

The error message. This parameter is returned if an exception occurred.

Missing 'user_id' in request.
AccessDeniedDetailobject

The details about the access denial.

string

The details about the access denial.

{ "AuthPrincipalType": "sub", "PolicyType": "AccountLevelIdentityBasedPolicy", "NoPermissionType": "NoPermission" }
TrialIdstring

The ID of the trial.

mf99W4
ExperimentIdstring

The ID of the HPO experiment.

abcde
Modelstring

The storage location of the model generated by the backend task to which the trial belongs.

model_table_name_foo
Hyperparamstring

The hyperparameter values of the trial.

{"${centerCount}": 5, "${distanceType}": "cosine"}
ParameterIdinteger

The ID assigned by the backend task to which the trial belongs.

0
Statusstring

The status of the trial.

FINISHED, FAILED, USER_CANCELED
MetricNamestring

The name of the metric. Not used.

AUC or F1, Accuracy etc.
Metricstring

The array of the results of the calculated metrics of the trial. The array includes one or more temporary values generated during the calculation and the final value.

[{"default":0.087745,"val_loss=([0-9\\\\.]+)":0.087745}, {"default":1.085841,"val_loss=([0-9\\\\.]+)":0.085841}, {"default":0.087745,"type":"FINAL","val_loss=([0-9\\\\.]+)":0.087745}]
JobMetastring

The meta information of the backend task to which the trial belongs. The value is in the JSON string format.

{"nni_trial_id": "asdf", "nni_exp_id": "abcde", "nni_trial_sequence_id": 2}
UserScoreinteger

Not used.

0
UserCommentstring

Not used.

best trial till now.
FinalMetricstring

The final metric value calculated by the backend task after the trial is completed. The value is the value of the default key in the metric item of the FINAL type in the metric array.

{"default":0.087745,"type":"FINAL","val_loss=([0-9\\\\.]+)":0.087745}
GmtCreateTimestring

The time at which the trial was created. The time is in UTC.

2024-01-02 12:34:56
GmtModifiedTimestring

The time at which the trial was last modified. The time is in UTC.

2024-01-02 21:32:56

Examples

Sample success responses

JSONformat

{
  "RequestId": "3F190916-B3E5-5D1E-AD0C-35C0DF105F51",
  "Code": "INVALID_INPUT_PARAMS",
  "Message": "Missing 'user_id' in request.",
  "AccessDeniedDetail": {
    "key": {
      "AuthPrincipalType": "sub",
      "PolicyType": "AccountLevelIdentityBasedPolicy",
      "NoPermissionType": "NoPermission"
    }
  },
  "TrialId": "mf99W4",
  "ExperimentId": "abcde",
  "Model": "model_table_name_foo",
  "Hyperparam": {
    "${centerCount}": 5,
    "${distanceType}": "cosine"
  },
  "ParameterId": 0,
  "Status": "FINISHED, FAILED, USER_CANCELED",
  "MetricName": "AUC or F1, Accuracy etc.",
  "Metric": [
    {
      "default": 0.087745,
      "val_loss=([0-9\\\\.]+)": 0.087745
    },
    {
      "default": 1.085841,
      "val_loss=([0-9\\\\.]+)": 0.085841
    },
    {
      "default": 0.087745,
      "type": "FINAL",
      "val_loss=([0-9\\\\.]+)": 0.087745
    }
  ],
  "JobMeta": {
    "nni_trial_id": "asdf",
    "nni_exp_id": "abcde",
    "nni_trial_sequence_id": 2
  },
  "UserScore": 0,
  "UserComment": "best trial till now.",
  "FinalMetric": {
    "default": 0.087745,
    "type": "FINAL",
    "val_loss=([0-9\\\\.]+)": 0.087745
  },
  "GmtCreateTime": "2024-01-02 12:34:56",
  "GmtModifiedTime": "2024-01-02 21:32:56"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-21The response structure of the API has changedView Change Details