From 1aba370b2176389de57da0342e537a606e292e0b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 1 Mar 2024 09:59:02 +0000 Subject: [PATCH 1/3] detach compute before attaching --- infra/bootstrapping/sdk_helpers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infra/bootstrapping/sdk_helpers.sh b/infra/bootstrapping/sdk_helpers.sh index df3206616c..7620eff2a4 100644 --- a/infra/bootstrapping/sdk_helpers.sh +++ b/infra/bootstrapping/sdk_helpers.sh @@ -494,6 +494,9 @@ function setup_compute() { then echo_info "Cluster is already attached to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}..." else + echo_info "Delete compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first" + az ml compute detach --subscription "${SUBSCRIPTION_ID}" --resource-group "${RESOURCE_GROUP_NAME}" --workspace-name "${WORKSPACE_NAME}" --name "${COMPUTE_NAME}" -y || true + echo_info "Attaching compute to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}" ATTACH_COMPUTE=$(az ml compute attach \ --subscription "${SUBSCRIPTION_ID}" \ From 05ab70283441bc0b6202d9a19df682365b6e275c Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 1 Mar 2024 10:00:27 +0000 Subject: [PATCH 2/3] fix typo --- infra/bootstrapping/sdk_helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/bootstrapping/sdk_helpers.sh b/infra/bootstrapping/sdk_helpers.sh index 7620eff2a4..191ba5a1e0 100644 --- a/infra/bootstrapping/sdk_helpers.sh +++ b/infra/bootstrapping/sdk_helpers.sh @@ -494,7 +494,7 @@ function setup_compute() { then echo_info "Cluster is already attached to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}..." else - echo_info "Delete compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first" + echo_info "Detach compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first" az ml compute detach --subscription "${SUBSCRIPTION_ID}" --resource-group "${RESOURCE_GROUP_NAME}" --workspace-name "${WORKSPACE_NAME}" --name "${COMPUTE_NAME}" -y || true echo_info "Attaching compute to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}" From 6e26f67ca93ffef9fa9a825be3e6e837b20eb393 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 5 Mar 2024 05:57:14 +0000 Subject: [PATCH 3/3] refine log --- infra/bootstrapping/sdk_helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/bootstrapping/sdk_helpers.sh b/infra/bootstrapping/sdk_helpers.sh index 191ba5a1e0..021f2cdb96 100644 --- a/infra/bootstrapping/sdk_helpers.sh +++ b/infra/bootstrapping/sdk_helpers.sh @@ -494,7 +494,7 @@ function setup_compute() { then echo_info "Cluster is already attached to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}..." else - echo_info "Detach compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first" + echo_info "Detach compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first, as k8s compute doesn't support update" az ml compute detach --subscription "${SUBSCRIPTION_ID}" --resource-group "${RESOURCE_GROUP_NAME}" --workspace-name "${WORKSPACE_NAME}" --name "${COMPUTE_NAME}" -y || true echo_info "Attaching compute to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}"