From 22934619dfb3ad28e73548759d1a56a94a1138c4 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Fri, 7 Aug 2020 10:06:13 -0700 Subject: [PATCH] [Release] Fix release tests (#9976) * In Progress. * Fix torch version. * Fix asan run.sh * Addressed code review. --- ci/asan_tests/run_asan_tests.sh | 22 ++++++++++--------- ci/long_running_tests/run.sh | 1 + ci/microbenchmark/run.sh | 1 + .../rllib_regresssion_tests/run.sh | 2 +- .../stress_tests/ray-project/cluster.yaml | 2 +- .../stress_tests/test_dead_actors.py | 2 +- .../stress_tests/test_many_tasks.py | 2 +- 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ci/asan_tests/run_asan_tests.sh b/ci/asan_tests/run_asan_tests.sh index 0ab279d21..4fa365e51 100755 --- a/ci/asan_tests/run_asan_tests.sh +++ b/ci/asan_tests/run_asan_tests.sh @@ -5,16 +5,20 @@ set -euxo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)" asan_install() { - (cd "${ROOT_DIR}"/../python && pip install -e . --verbose) + echo "installing" + (cd "${ROOT_DIR}"/../ray/python && pip install -e . --verbose) } asan_setup() { echo "Setting up the environment" + pip uninstall -y ray || true + conda uninstall -y wrapt || true + pip install wrapt || true pip install -r ray-project/requirements.txt pip install -U pytest==5.4.3 echo "Installing cython example" - (cd "${ROOT_DIR}"/../doc/examples/cython && python setup.py install --user) + (cd "${ROOT_DIR}"/../ray/doc/examples/cython && python setup.py install --user) echo "Settting up the shell" echo "build --config=asan" >> ~/.bazelrc # Setup cache @@ -22,6 +26,7 @@ asan_setup() { echo "ASAN_OPTIONS=detect_leaks=0" >> ~/.bashrc echo "Compiling ray" + cd "${ROOT_DIR}"/../ray/ git fetch git pull origin master asan_install || true @@ -32,16 +37,13 @@ asan_run() { export LD_PRELOAD="/usr/lib/gcc/x86_64-linux-gnu/7/libasan.so" export ASAN_OPTIONS="detect_leaks=0" - cd "${ROOT_DIR}"/../.. - - # async plasma test - python -m pytest -v --durations=5 --timeout=300 python/ray/tests/test_async.py + cd "${ROOT_DIR}"/../ray # Ray tests - bazel test --test_tag_filters=-jenkins_only python/ray/serve/... - bazel test --test_tag_filters=-jenkins_only python/ray/dashboard/... - bazel test --test_tag_filters=-jenkins_only python/ray/tests/... - bazel test --test_tag_filters=-jenkins_only python/ray/tune/... + bazel test --test_tag_filters=-jenkins_only --test_output=streamed python/ray/serve/... + bazel test --test_tag_filters=-jenkins_only --test_output=streamed python/ray/dashboard/... + bazel test --test_tag_filters=-jenkins_only --test_output=streamed python/ray/tests/... + bazel test --test_tag_filters=-jenkins_only --test_output=streamed python/ray/tune/... ) } diff --git a/ci/long_running_tests/run.sh b/ci/long_running_tests/run.sh index 171256fa4..86e81bc8f 100644 --- a/ci/long_running_tests/run.sh +++ b/ci/long_running_tests/run.sh @@ -51,6 +51,7 @@ echo "workload: $workload" wheel="https://s3-us-west-2.amazonaws.com/ray-wheels/$ray_branch/$commit/ray-$ray_version-cp36-cp36m-manylinux1_x86_64.whl" pip install -U pip +unset RAY_ADDRESS source activate tensorflow_p36 && pip install -q -U "$wheel" Click source activate tensorflow_p36 && pip install -q "ray[all]" "gym[atari]" source activate tensorflow_p36 && python "workloads/$workload.py" diff --git a/ci/microbenchmark/run.sh b/ci/microbenchmark/run.sh index a1fcc0b6a..81784679a 100644 --- a/ci/microbenchmark/run.sh +++ b/ci/microbenchmark/run.sh @@ -48,4 +48,5 @@ wget "https://s3-us-west-2.amazonaws.com/ray-wheels/$ray_branch/$commit/ray-$ray pip uninstall -y -q ray pip install -U "ray-$ray_version-cp36-cp36m-manylinux1_x86_64.whl" +unset RAY_ADDRESS OMP_NUM_THREADS=64 ray microbenchmark diff --git a/ci/regression_test/rllib_regresssion_tests/run.sh b/ci/regression_test/rllib_regresssion_tests/run.sh index 4352773a4..8d9dffc8b 100644 --- a/ci/regression_test/rllib_regresssion_tests/run.sh +++ b/ci/regression_test/rllib_regresssion_tests/run.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -source activate tensorflow_p36 && pip install torch torchvision +source activate tensorflow_p36 && pip install torch==1.4 torchvision source activate tensorflow_p36 && rllib train -f compact-regression-test.yaml diff --git a/ci/regression_test/stress_tests/ray-project/cluster.yaml b/ci/regression_test/stress_tests/ray-project/cluster.yaml index 8d4ef87ed..45bfa8e78 100644 --- a/ci/regression_test/stress_tests/ray-project/cluster.yaml +++ b/ci/regression_test/stress_tests/ray-project/cluster.yaml @@ -97,7 +97,7 @@ setup_commands: # - git clone https://github.com/ray-project/ray || true # - ray/ci/travis/install-bazel.sh - pip install -U pip - - conda uninstall -y terminado + - conda uninstall -y terminado || true - pip install terminado - pip install boto3==1.4.8 cython==0.29.0 # - cd ray/python; git checkout master; git pull; pip install -e . --verbose diff --git a/ci/regression_test/stress_tests/test_dead_actors.py b/ci/regression_test/stress_tests/test_dead_actors.py index 3d0c05dac..8cf537493 100644 --- a/ci/regression_test/stress_tests/test_dead_actors.py +++ b/ci/regression_test/stress_tests/test_dead_actors.py @@ -10,7 +10,7 @@ import ray logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -ray.init(address="localhost:6379") +ray.init(address="auto") # These numbers need to correspond with the autoscaler config file. # The number of remote nodes in the autoscaler should upper bound diff --git a/ci/regression_test/stress_tests/test_many_tasks.py b/ci/regression_test/stress_tests/test_many_tasks.py index 14428fbdc..f486b2d18 100644 --- a/ci/regression_test/stress_tests/test_many_tasks.py +++ b/ci/regression_test/stress_tests/test_many_tasks.py @@ -9,7 +9,7 @@ import ray logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -ray.init(address="localhost:6379") +ray.init(address="auto") # These numbers need to correspond with the autoscaler config file. # The number of remote nodes in the autoscaler should upper bound