如何从已经添加到AML的笔记本中获取现有的AKS。创建集群
attach_config = AksCompute.attach_configuration(resource_id=resource_id)
aks_target = ComputeTarget.attach(workspace=ws, name=create_name, attach_configuration=attach_config)
aks_target.wait_for_completion(True)
列出工作区中的所有ComputeTarget对象:请点击以下链接。https://docs.microsoft.com/zh-cn/python/api/azureml-core/azureml.core.compute.computetarget?view=azure-ml-py#list-workspace-
您可以如下所示进行操作。
from azureml.core.compute import AksCompute, ComputeTarget
aks_name = 'YOUR_EXISTING_CLUSTER_NAME’
aks_target =AksCompute(ws, aks_name)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句