管理引擎版本

本页介绍了如何管理 AML AI 引擎版本。引擎版本用于控制训练和运行模型的架构或设置。它是只读资源。

如需详细了解引擎版本,请参阅引擎版本

准备工作

列出引擎版本

如需列出引擎版本,请使用 projects.locations.instances.engineVersions.list 方法。

在使用任何请求数据之前,请先进行以下替换:

  • PROJECT_IDIAM 设置中列出的 Google Cloud 项目 ID
  • LOCATION:实例的位置;请使用其中一个受支持的区域
    显示位置
    • us-central1
    • us-east1
    • asia-south1
    • europe-west1
    • europe-west2
    • europe-west4
    • northamerica-northeast1
    • southamerica-east1
    • australia-southeast1
  • INSTANCE_ID:实例的用户定义标识符

如需发送请求,请选择以下方式之一:

curl

执行以下命令:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions"

PowerShell

执行以下命令:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions" | Select-Object -Expand Content

您应该收到类似以下内容的 JSON 响应:

{
  "engineVersions": [
    {
      "name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/finserv-aml.live-with-data-validation.v1.1.2022-05",
      "state": "ACTIVE",
      "expectedLimitationStartTime": EXPECTED_LIMITATION_START_TIME,
      "expectedDecommissionTime": "EXPECTED_DECOMMISSION_TIME,
      "lineOfBusiness": "RETAIL"
    },
    {
      "name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/finserv-aml.live.v1.1.2022-05",
      "state": "ACTIVE",
      "expectedLimitationStartTime": EXPECTED_LIMITATION_START_TIME,
      "expectedDecommissionTime": "EXPECTED_DECOMMISSION_TIME,
      "lineOfBusiness": "RETAIL"
    }
  ]
}

获取引擎版本

如需获取引擎版本,请使用 projects.locations.instances.engineVersions.get 方法。

在使用任何请求数据之前,请先进行以下替换:

  • PROJECT_IDIAM 设置中列出的 Google Cloud 项目 ID
  • LOCATION:实例的位置;请使用某个受支持的地区
    显示位置
    • us-central1
    • us-east1
    • asia-south1
    • europe-west1
    • europe-west2
    • europe-west4
    • northamerica-northeast1
    • southamerica-east1
    • australia-southeast1
  • INSTANCE_ID:实例的用户定义标识符
  • ENGINE_VERSION_ID:引擎版本的标识符

如需发送请求,请选择以下方式之一:

curl

执行以下命令:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID"

PowerShell

执行以下命令:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID" | Select-Object -Expand Content

您应该收到类似以下内容的 JSON 响应:

{
  "name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
  "state": "ACTIVE",
  "expectedLimitationStartTime": EXPECTED_LIMITATION_START_TIME,
  "expectedDecommissionTime": "EXPECTED_DECOMMISSION_TIME,
  "lineOfBusiness": "RETAIL"
}