From 0f3205af0b4d66444faba012a96a2b49af2433c9 Mon Sep 17 00:00:00 2001 From: Qstar Date: Sat, 18 Jan 2020 02:42:30 +0800 Subject: [PATCH] [Projects] Delete pods associated with the project when running ray session stop (#6787) --- python/ray/projects/scripts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ray/projects/scripts.py b/python/ray/projects/scripts.py index 77374e0f4..2e6d4d8b0 100644 --- a/python/ray/projects/scripts.py +++ b/python/ray/projects/scripts.py @@ -326,6 +326,10 @@ def attach(screen, tmux): @click.option("--name", help="Name of the session to stop", default=None) def stop(name): project_definition = load_project_or_throw() + + if not name: + name = project_definition.config["name"] + teardown_cluster( project_definition.cluster_yaml(), yes=True,