All Products
Search
Document Center

Platform For AI:GetHpoExperiment

Last Updated:Oct 21, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries the information about a hyperparameter optimization (HPO) experiment, including the status and configuration of the experiment, and the status of its trials.

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:GetHpoExperimentget
*HpoExperiment
acs:paiautoml:{#regionId}:{#accountId}:hpoexperiment/{#HpoExperimentId}
    none
none

Request syntax

GET /api/automl/v1/hpo/experiment/{ExperimentId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ExperimentIdstringNo

The ID of the HPO experiment.

sX5O9Q8

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

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.

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

The ID of the HPO experiment.

sX5O9Q8
Creatorstring

The ID of the user who created the experiment.

123456789
SearchSpacestring

The configuration content of the search_space.json file.

{"${centerCount}":{"_type":"choice","_value":[2,3,4,5]},"${distanceType}":{"_type":"choice","_value":["euclidean","cosine","cityblock"]}}
Namestring

The name of the experiment.

my_hpo_exp_1
Statusstring

The status of the experiment. Valid values:

INVALID_USER_OR_EXP, SUCCESS, or EXECUTION_FAILURE
JobTypestring

The type of the experiment. For HPO experiments, the value of this parameter is 1.

1
ConfigInistring

The content of the trial.ini configuration file.

[odps_config] access_id=foo access_key=bar end_point=http://service.odps.aliyun.com/api log_view_host=http://logview.odps.aliyun.com project_name=my_project
ConfigYmlstring

The content of the exp.yml configuration file.

assessor: classArgs: optimize_mode: maximize start_step: 1 name: PAIAssessor debug: true experimentName: maxcompute_kmeans_monitor experimentWorkingDirectory: ../expdir logLevel: debug maxTrialNumber: 10 searchSpaceFile: search_space.json trainingService: platform: local trialCommand: python3 -m hpo_tools.core.utils.run --config=./config.ini trialConcurrency: 2 tuner: classArgs: optimize_mode: maximize name: TPE
GmtCreateTimestring

The time at which the experiment was created.

2024-01-01 08:30:11
GmtModifiedTimestring

The time at which the experiment data was last updated.

2024-01-01 08:30:11
WorkspaceIdstring

The workspace ID.

12345
Accessibilitystring

The visibility of the experiment in the workspace.

  • PRIVATE: The experiment is visible only to you and the administrator of the workspace.
  • PUBLIC: The experiment is public in the workspace.
PRIVATE
Descriptionstring

The description of the experiment.

This is experiment is for tune the LR of model.
TrialCountinteger

The number of trials that are generated by the experiment.

3
TrialStatusobject

The status and number of the trials.

string

The information that contains the status of the trials and the trials in each state.

{‘FINISHED':1, 'RUNNING':2}
HpoExperimentConfigurationobject

The configuration information of the experiment.

{ "output_config": { "model_path": "bi_ps_${exp_id}_${trial_id}" }, "platform_config": { "cmd": [ "PAI -name ps_smart\n -project foo", "PAI -name prediction\n -project foo", "PAI -name evaluate -project foo", "INSERT OVERWRITE TABLE my_table;" ], "name": "MaxCompute" }, "metric_config": { "metric_dict": { "recall": 0.5, "auc": 0.25, "precision": 0.25 }, "metric_source": [ "select * from my_metrics where pt='${exp_id}_${trial_id}';" ], "metric_type": "table", "final_mode": "best" }, "odps_config": { "project_name": "my_project", "role_arn": "acs:ram::123456789:role/aliyunserviceroleforfoo", "region": "cn-shanghai", "end_point": "http://service.cn.maxcompute.aliyun-inc.com/api", "log_view_host": "http://logview.odps.aliyun.com" }, "yml_config": { "max_trial_number": 5, "assessor": { "name": "PAIAssessor", "class_args": { "earlystop": true, "start_step": 5, "optimize_mode": "maximize" } }, "experiment_name": "my_exp", "tuner": { "name": "TPE", "class_args": { "optimize_mode": "maximize" } }, "trial_concurrency": 2 }, "search_space": { "${max_depth}": { "_type": "choice", "_value": [ 1, 3, 5 ] }, "${tree_count}": { "_value": [ 50, 100, 150 ], "_type": "choice" } } }
Deletedboolean

Indicates whether the experiment is deleted.

0
Tagsarray<object>

List of user-defined tags

tagsobject

Resource tags.

Keystring

Tag key

group
Valuestring

Tag value.

group_name

Examples

Sample success responses

JSONformat

{
  "RequestId": "3F190916-B3E5-5D1E-AD0C-35C0DF105F51",
  "Code": "INVALID_INPUT_PARAMS",
  "Message": "Missing 'user_id' in request.",
  "AccessDeniedDetail": {
    "AuthPrincipalType": "sub",
    "PolicyType": "AccountLevelIdentityBasedPolicy",
    "NoPermissionType": "NoPermission"
  },
  "ExperimentId": "sX5O9Q8",
  "Creator": 123456789,
  "SearchSpace": {
    "${centerCount}": {
      "_type": "choice",
      "_value": [
        2,
        3,
        4,
        5
      ]
    },
    "${distanceType}": {
      "_type": "choice",
      "_value": [
        "euclidean",
        "cosine",
        "cityblock"
      ]
    }
  },
  "Name": "my_hpo_exp_1",
  "Status": "INVALID_USER_OR_EXP, SUCCESS, or EXECUTION_FAILURE",
  "JobType": 1,
  "ConfigIni": "[odps_config]\naccess_id=foo\naccess_key=bar\nend_point=http://service.odps.aliyun.com/api\nlog_view_host=http://logview.odps.aliyun.com\nproject_name=my_project",
  "ConfigYml": "assessor:\n  classArgs:\n    optimize_mode: maximize\n    start_step: 1\n  name: PAIAssessor\ndebug: true\nexperimentName: maxcompute_kmeans_monitor\nexperimentWorkingDirectory: ../expdir\nlogLevel: debug\nmaxTrialNumber: 10\nsearchSpaceFile: search_space.json\ntrainingService:\n  platform: local\ntrialCommand: python3 -m hpo_tools.core.utils.run --config=./config.ini\ntrialConcurrency: 2\ntuner:\n  classArgs:\n    optimize_mode: maximize\n  name: TPE",
  "GmtCreateTime": "2024-01-01 08:30:11",
  "GmtModifiedTime": "2024-01-01 08:30:11",
  "WorkspaceId": 12345,
  "Accessibility": "PRIVATE",
  "Description": "This is experiment is for tune the LR of model.",
  "TrialCount": 3,
  "TrialStatus": {
    "key": "{‘FINISHED':1, 'RUNNING':2}"
  },
  "HpoExperimentConfiguration": {
    "output_config": {
      "model_path": "bi_ps_${exp_id}_${trial_id}"
    },
    "platform_config": {
      "cmd": [
        "PAI -name ps_smart\n    -project foo",
        "PAI -name prediction\n    -project foo",
        "PAI -name evaluate -project foo",
        "INSERT OVERWRITE TABLE my_table;"
      ],
      "name": "MaxCompute"
    },
    "metric_config": {
      "metric_dict": {
        "recall": 0.5,
        "auc": 0.25,
        "precision": 0.25
      },
      "metric_source": [
        "select * from my_metrics where pt='${exp_id}_${trial_id}';"
      ],
      "metric_type": "table",
      "final_mode": "best"
    },
    "odps_config": {
      "project_name": "my_project",
      "role_arn": "acs:ram::123456789:role/aliyunserviceroleforfoo",
      "region": "cn-shanghai",
      "end_point": "http://service.cn.maxcompute.aliyun-inc.com/api",
      "log_view_host": "http://logview.odps.aliyun.com"
    },
    "yml_config": {
      "max_trial_number": 5,
      "assessor": {
        "name": "PAIAssessor",
        "class_args": {
          "earlystop": true,
          "start_step": 5,
          "optimize_mode": "maximize"
        }
      },
      "experiment_name": "my_exp",
      "tuner": {
        "name": "TPE",
        "class_args": {
          "optimize_mode": "maximize"
        }
      },
      "trial_concurrency": 2
    },
    "search_space": {
      "${max_depth}": {
        "_type": "choice",
        "_value": [
          1,
          3,
          5
        ]
      },
      "${tree_count}": {
        "_value": [
          50,
          100,
          150
        ],
        "_type": "choice"
      }
    }
  },
  "Deleted": true,
  "Tags": [
    {
      "Key": "group",
      "Value": "group_name"
    }
  ]
}

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