Don't stop Jupyter notebook in ray stop. (#5387)

This commit is contained in:
Robert Nishihara 2019-08-11 15:18:01 -07:00 committed by Richard Liaw
parent cff72d1a54
commit 61b23a9a70

View file

@ -410,20 +410,6 @@ def stop():
"' | grep -v grep | " + "awk '{ print $2 }') 2> /dev/null")
subprocess.call([command], shell=True)
# Find the PID of the jupyter process and kill it.
try:
from notebook.notebookapp import list_running_servers
pids = [
str(server["pid"]) for server in list_running_servers()
if "/tmp/ray" in server["notebook_dir"]
]
subprocess.call(
["kill -9 {} 2> /dev/null".format(" ".join(pids))], shell=True)
except ImportError:
pass
except Exception:
logger.exception("Error shutting down jupyter")
@cli.command()
@click.argument("cluster_config_file", required=True, type=str)