Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

The cleanup script doesn't include any actual cleanup logic #20

Open
dkmiller opened this issue Nov 17, 2020 · 5 comments
Open

The cleanup script doesn't include any actual cleanup logic #20

dkmiller opened this issue Nov 17, 2020 · 5 comments
Labels
aml-ds Azure ML Data Science team

Comments

@dkmiller
Copy link

All it does is "iterate through" all webservices and compute targets.

Recommendation: it should shut down / scale down all actively running compute.

@dkmiller dkmiller added the aml-ds Azure ML Data Science team label Nov 17, 2020
@lostmygithubaccount
Copy link
Contributor

closing, linked wrong issue # in the PR

@lostmygithubaccount
Copy link
Contributor

whoops my bad

@lostmygithubaccount
Copy link
Contributor

for this issue, one problem is all of the compute types return different things:
image

@lostmygithubaccount
Copy link
Contributor

so the example cleanup script does something like this:

# delete some compute targets
for compute_target in ws.compute_targets:
    if ws.compute_targets[compute_target].get_status() in ["Failed", "Canceled", None]:
        try:
            ws.compute_targets[compute_target].delete()
        except:
            pass
    elif (
        "dask-ct" in compute_target
        and ws.compute_targets[compute_target]
        .get_status()
        .serialize()["provisioningState"]
        in ["Succeeded"]
        and len(ws.compute_targets[compute_target].list_nodes()) == 0
    ):
        ws.compute_targets[compute_target].delete()

should we maybe check if any clusters have nodes > 1 and do something?

I'm a little afraid to have any real logic in this cleanup script given a user might not notice and unintentionally have their compute deleted/runs cancelled

@dkmiller
Copy link
Author

I'd suggest checking for clusters with ≥ 1 nodes that aren't running (to make sure we don't kill active runs) and then forcibly scale them down to zero nodes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aml-ds Azure ML Data Science team
Projects
None yet
Development

No branches or pull requests

2 participants