Skip to content

Commit

Permalink
detach compute before attaching, as k8s compute doesn't support update (
Browse files Browse the repository at this point in the history
#3030)

* detach compute before attaching

* fix typo

* refine log

---------

Co-authored-by: Ubuntu <zetia@DevBox-zetia.1jltvvkrfgyuhl3llhmbyldkog.bx.internal.cloudapp.net>
  • Loading branch information
zetiaatgithub and Ubuntu authored Mar 26, 2024
1 parent 0c60cd5 commit 735144d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infra/bootstrapping/sdk_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "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}"
ATTACH_COMPUTE=$(az ml compute attach \
--subscription "${SUBSCRIPTION_ID}" \
Expand Down

0 comments on commit 735144d

Please sign in to comment.