本页面介绍了如何管理 AML AI 引擎版本。引擎版本用于控制训练和运行模型的架构或设置。这是一个只读资源。
如需详细了解引擎版本,请参阅引擎版本。
准备工作
-
如需获得管理引擎版本所需的权限,请让管理员向您授予项目的 Financial Services Admin (
financialservices.admin) IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。 - 创建实例
列出引擎版本
如需列出引擎版本,请使用 projects.locations.instances.engineVersions.list 方法。
在使用任何请求数据之前,请先进行以下替换:
PROJECT_ID:IAM 设置中列出的 Google Cloud 项目 IDLOCATION:实例的位置;请使用其中一个受支持的区域显示位置us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-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_ID:IAM 设置中列出的 Google Cloud 项目 IDLOCATION:实例的位置;请使用其中一个受支持的区域显示位置us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-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"
}