Add script for shutting down tests. (#4203)

This commit is contained in:
Robert Nishihara
2019-03-01 19:56:30 -08:00
committed by Philipp Moritz
parent f21e6a2cff
commit c4aa90314d
2 changed files with 27 additions and 0 deletions
+6
View File
@@ -24,6 +24,12 @@ relevant machine, attach to the tmux session (usually ``tmux a -t 0``), inspect
the logs under ``/tmp/ray/session*/logs/``, and also inspect
``/tmp/ray/session*/debug_state.txt``.
Shut Down the Workloads
-----------------------
The instances running the workloads can all be killed by running
``./shut_down_workloads.sh``.
Adding a Workload
-----------------
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
pushd "$ROOT_DIR"
# Kill all of the workloads.
for workload_file in "$ROOT_DIR"/workloads/*; do
file_name=$(basename -- $workload_file)
workload_name="${file_name%.*}"
ray down -y config.yaml --cluster-name="$workload_name" &
done
# Wait for all of the ray down commands to finish.
for pid in `jobs -p`; do
wait $pid
done
popd