forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make release stress tests work and improve them. (ray-project#4955)
- Loading branch information
1 parent
e6baffb
commit 6f48992
Showing
7 changed files
with
168 additions
and
125 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,61 @@ | ||
#!/usr/bin/env bash | ||
|
||
# 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 | ||
echo -e $RAY_AWS_SSH_KEY > /root/.ssh/ray-autoscaler_us-west-2.pem && chmod 400 /root/.ssh/ray-autoscaler_us-west-2.pem || true | ||
|
||
touch "$RESULT_FILE" | ||
echo "Logging to" "$RESULT_FILE" | ||
|
||
# Show explicitly which commands are currently running. This should only be AFTER | ||
# the private key is placed. | ||
set -x | ||
if [[ -z "$1" ]]; then | ||
echo "ERROR: The first argument must be the Ray version string." | ||
exit 1 | ||
else | ||
RAY_VERSION=$1 | ||
fi | ||
|
||
touch $RESULT_FILE | ||
if [[ -z "$2" ]]; then | ||
echo "ERROR: The second argument must be the commit hash to test." | ||
exit 1 | ||
else | ||
RAY_COMMIT=$2 | ||
fi | ||
|
||
echo "Testing ray==$RAY_VERSION at commit $RAY_COMMIT." | ||
echo "The wheels used will live under https://s3-us-west-2.amazonaws.com/ray-wheels/releases/$RAY_VERSION/$RAY_COMMIT/" | ||
|
||
run_test(){ | ||
local test_name=$1 | ||
|
||
local CLUSTER="stress_testing_config.yaml" | ||
local CLUSTER="stress_testing_config_temporary.yaml" | ||
|
||
cat stress_testing_config.yaml | | ||
sed -e " | ||
s/<<<RAY_VERSION>>>/$RAY_VERSION/g; | ||
s/<<<RAY_COMMIT>>>/$RAY_COMMIT/;" > "$CLUSTER" | ||
|
||
echo "Try running $test_name." | ||
{ | ||
ray up -y $CLUSTER --cluster-name "$test_name" && | ||
sleep 1 && | ||
ray --logging-level=DEBUG submit $CLUSTER --cluster-name "$test_name" "$test_name.py" | ||
} || echo "FAIL: $test_name" >> $RESULT_FILE | ||
ray --logging-level=DEBUG submit "$CLUSTER" --cluster-name "$test_name" "$test_name.py" | ||
} || echo "FAIL: $test_name" >> "$RESULT_FILE" | ||
|
||
# Tear down cluster. | ||
if [ "$DEBUG_MODE" = "" ]; then | ||
ray down -y $CLUSTER --cluster-name "$test_name" | ||
rm "$CLUSTER" | ||
else | ||
echo "Not tearing down cluster" $CLUSTER | ||
echo "Not tearing down cluster" "$CLUSTER" | ||
fi | ||
} | ||
|
||
pushd "$ROOT_DIR" | ||
run_test test_many_tasks_and_transfers | ||
run_test test_many_tasks | ||
run_test test_dead_actors | ||
popd | ||
|
||
cat $RESULT_FILE | ||
[ ! -s $RESULT_FILE ] || exit 1 | ||
cat "$RESULT_FILE" | ||
[ ! -s "$RESULT_FILE" ] || exit 1 |
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
File renamed without changes.
Oops, something went wrong.