forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update stress tests. (ray-project#3614)
Starts clusters for testing and has a fallback to kill the cluster if the command fails. The results are then printed at the end of test.
- Loading branch information
1 parent
a5d1f03
commit 27c20a4
Showing
3 changed files
with
59 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Cause the script to exit if a single command fails. | ||
set -e | ||
|
||
# Show explicitly which commands are currently running. | ||
set -x | ||
|
||
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) | ||
RESULT_FILE=$ROOT_DIR/results-$(date '+%Y-%m-%d_%H-%M-%S').log | ||
echo "Logging to" $RESULT_FILE | ||
touch $RESULT_FILE | ||
|
||
run_test(){ | ||
local test_name=$1 | ||
|
||
local CLUSTER="stress_testing_config.yaml" | ||
echo "Try running $test_name." | ||
{ | ||
ray up -y $CLUSTER --cluster-name "$test_name" && | ||
sleep 1 && | ||
ray submit $CLUSTER --cluster-name "$test_name" "$test_name.py" | ||
} || echo "FAIL: $test_name" >> $RESULT_FILE | ||
|
||
# Start a large cluster using the autoscaler. | ||
ray up -y $ROOT_DIR/stress_testing_config.yaml | ||
# Tear down cluster. | ||
if [ "$DEBUG_MODE" = "" ]; then | ||
ray down -y $CLUSTER --cluster-name "$test_name" | ||
else | ||
echo "Not tearing down cluster" $CLUSTER | ||
fi | ||
} | ||
|
||
# Run a bunch of stress tests. | ||
ray submit $ROOT_DIR/stress_testing_config.yaml test_many_tasks_and_transfers.py | ||
ray submit $ROOT_DIR/stress_testing_config.yaml test_dead_actors.py | ||
pushd "$ROOT_DIR" | ||
run_test test_many_tasks_and_transfers | ||
run_test test_dead_actors | ||
popd | ||
|
||
# Tear down the cluster. | ||
ray down -y $ROOT_DIR/stress_testing_config.yaml | ||
cat $RESULT_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters