KubernetesCompute 类
注意
这是一个试验性的类,随时可能更改。 有关详细信息,请参阅 https://aka.ms/azuremlexperimental。
KubernetesCompute(预览版)是一个客户托管的 K8s 群集,由群集管理员附加到工作区。
被授予计算访问权限和配额的用户可轻松指定单节点或分布式多节点 ML 工作负载并将其提交到计算。 计算在容器化环境中执行,将模型的依赖项打包在 Docker 容器中。 有关详细信息,请参阅什么是 Azure 机器学习中的计算目标?https://docs.microsoft.com/azure/machine-learning/concept-compute-target
- 继承
-
KubernetesCompute
构造函数
KubernetesCompute(workspace, name)
参数
注解
在以下示例中,创建了由 <xref:azureml.contrib.core.compute.KubernetesCompute.KubernetesCompute> 预配的持续计算目标。 此示例中的 provisioning_configuration 参数属于 <xref:azureml.contrib.core.compute.KubernetesCompute.KubernetesComputeAttachConfiguration> 类型,它是 <xref:azureml.contrib.core.compute.KubernetesCompute.ComputeTargetAttachConfiguration> 的子类。
方法
| attach_configuration |
创建用于附加计算目标的配置对象。 |
| delete |
KubernetesCompute 对象不支持删除操作。 请改用 detach。 |
| deserialize |
将 JSON 对象转换为 KubernetesCompute 对象。 |
| detach |
将 KubernetesCompute 对象与其关联的工作区拆离。 不会删除基础云对象,只会删除其关联。 |
| get |
向 mlc 发送 GET 计算对象请求。 |
| get_status |
检索 KubernetesCompute 群集的当前详细状态。 |
| refresh_state |
执行对象属性的就地更新。 此方法根据相应云对象的当前状态更新属性。 这主要手动轮询计算状态。 |
| serialize |
将此 KubernetesCompute 对象转换为 JSON 序列化字典。 |
| wait_for_completion |
等待 Kubernetes Compute 群集完成预配。 |
attach_configuration
创建用于附加计算目标的配置对象。
static attach_configuration(resource_id=None, namespace=None, identity_type=None, identity_ids=None)
参数
用户分配标识的资源 ID 列表。 例如 ['/subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/']
返回
附加 KubernetesCompute 对象时要使用的配置对象。
返回类型
delete
deserialize
将 JSON 对象转换为 KubernetesCompute 对象。
static deserialize(workspace, object_dict)
参数
返回
提供的 JSON 对象的 KubernetesCompute 表示形式。
返回类型
例外
注解
如果提供的工作区不是与计算关联的工作区,则引发 ComputeTargetException。
detach
get
向 mlc 发送 GET 计算对象请求。
get()
get_status
refresh_state
执行对象属性的就地更新。
此方法根据相应云对象的当前状态更新属性。 这主要手动轮询计算状态。
refresh_state()
serialize
wait_for_completion
等待 Kubernetes Compute 群集完成预配。
wait_for_completion(show_output=False, is_delete_operation=False)
参数
例外
反馈
提交和查看相关反馈