Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ray-core] Initial addition of performance integration testing files #4325

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
390ec68
Initial addition of performance integration testing files
devin-petersohn Mar 11, 2019
1d65690
Update tests
devin-petersohn Mar 12, 2019
f59d876
Fix tests
devin-petersohn Mar 12, 2019
bf51cba
Fix dockerfile
devin-petersohn Mar 12, 2019
8b17aad
Fix dockerfile
devin-petersohn Mar 12, 2019
24cd568
Fix dockerfile
devin-petersohn Mar 12, 2019
e45b22c
Fix dockerfile
devin-petersohn Mar 12, 2019
c03d2ea
Fix dockerfile
devin-petersohn Mar 12, 2019
e93cdf5
Update dockerfile and test
devin-petersohn Mar 12, 2019
8271a0b
Fix dockerfile
devin-petersohn Mar 12, 2019
1b4e56e
Fix dockerfile
devin-petersohn Mar 12, 2019
e467e70
fix dockerfile
devin-petersohn Mar 13, 2019
12e084c
Fix dockerfile
devin-petersohn Mar 13, 2019
2b768a5
Fix dockerfile
devin-petersohn Mar 13, 2019
f195dc4
fix dockerfile
devin-petersohn Mar 13, 2019
298d73f
fix dockerfile
devin-petersohn Mar 13, 2019
232fa6e
Fix dockerfile
devin-petersohn Mar 13, 2019
d2d0ffa
fix dockerfile
devin-petersohn Mar 13, 2019
1e53334
Fix script
devin-petersohn Mar 13, 2019
bf06e5f
Fix script
devin-petersohn Mar 13, 2019
0136e97
Fix script
devin-petersohn Mar 13, 2019
1f028b1
Fix script
devin-petersohn Mar 14, 2019
4d6dcc3
Fix script
devin-petersohn Mar 15, 2019
59486b4
Fix script
devin-petersohn Mar 17, 2019
d413295
Fix script
devin-petersohn Mar 17, 2019
cc4e2ce
Fix permissions
devin-petersohn Mar 17, 2019
8829a2b
Fix script
devin-petersohn Mar 17, 2019
e203e29
Fix script
devin-petersohn Mar 18, 2019
80fe10e
Remove dockerfile
devin-petersohn Mar 18, 2019
d9cbaf5
Fix script
devin-petersohn Mar 20, 2019
9934255
Fix script
devin-petersohn Mar 20, 2019
acd8e42
Add python eval script
devin-petersohn Mar 20, 2019
234385b
Fix script
devin-petersohn Mar 20, 2019
c6fc329
Fix script
devin-petersohn Mar 20, 2019
b844342
Fix script
devin-petersohn Mar 20, 2019
a30c2b7
Fix script
devin-petersohn Mar 20, 2019
dcea314
Fix test
devin-petersohn Mar 21, 2019
50cee6d
Fix script
devin-petersohn Mar 22, 2019
8775e18
Fix script
devin-petersohn Mar 22, 2019
ea58466
Fix script
devin-petersohn Mar 28, 2019
6772a3e
Fix script
devin-petersohn Mar 28, 2019
609791f
fix typo
devin-petersohn Mar 28, 2019
e4a38c4
Address comments
devin-petersohn Mar 28, 2019
c5bcc2c
Fix script
devin-petersohn Mar 28, 2019
07ea9b2
Fix script
devin-petersohn Mar 28, 2019
85fe365
Remove unused script
devin-petersohn Mar 29, 2019
584e38b
Lint
devin-petersohn Mar 31, 2019
9dea9be
Address comments
devin-petersohn Apr 9, 2019
dec5636
Fix `reinit_error`
devin-petersohn Apr 10, 2019
7dc6f15
Fix `benchmark`
devin-petersohn Apr 10, 2019
2991927
Fix test script
devin-petersohn Apr 10, 2019
d95a1fc
Fix parameter
devin-petersohn Apr 10, 2019
14b96b8
Lint
devin-petersohn Apr 23, 2019
5195cc1
Update version
devin-petersohn Apr 23, 2019
ac6174d
Update Autoscalar config
devin-petersohn Apr 24, 2019
a305e04
Merge branch 'master' into testing/init_perf_integration
devin-petersohn Apr 25, 2019
c1a19e8
Address comment
devin-petersohn Apr 30, 2019
8b27a0e
Update test_perf_integration.py
devin-petersohn May 3, 2019
c1a1e67
Lint
devin-petersohn May 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ script:
# ray tests
# Python3.5+ only. Otherwise we will get `SyntaxError` regardless of how we set the tester.
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -c 'import sys;exit(sys.version_info>=(3,5))' || python -m pytest -v --durations=5 --timeout=300 python/ray/experimental/test/async_test.py; fi
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -m pytest -v --durations=10 --timeout=300 python/ray/tests; fi
- if [ $RAY_CI_PYTHON_AFFECTED == "1" ]; then python -m pytest -v --durations=10 --timeout=300 python/ray/tests --ignore=python/ray/tests/perf_integration_tests; fi

deploy:
- provider: s3
Expand Down
25 changes: 25 additions & 0 deletions ci/jenkins_tests/perf_integration_tests/run_perf_integration.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Show explicitly which commands are currently running.
set -ex

ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)

pushd "$ROOT_DIR"

python -m pip install pytest-benchmark

pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.7.0.dev3-cp27-cp27mu-manylinux1_x86_64.whl
python -m pytest --benchmark-autosave --benchmark-min-rounds=10 --benchmark-columns="min, max, mean" $ROOT_DIR/../../../python/ray/tests/perf_integration_tests/test_perf_integration.py

pushd $ROOT_DIR/../../../python
python -m pip install -e .
popd

python -m pytest --benchmark-compare --benchmark-min-rounds=10 --benchmark-compare-fail=min:5% --benchmark-columns="min, max, mean" $ROOT_DIR/../../../python/ray/tests/perf_integration_tests/test_perf_integration.py

# This is how Modin stores the values in an S3 bucket
#sha_tag=`git rev-parse --verify --short HEAD`
# save the results to S3
#aws s3 cp .benchmarks/*/*.json s3://modin-jenkins-result/${sha_tag}-perf-${BUCKET_SUFFIX}/ --acl public-read
#rm -rf .benchmarks
Empty file.
43 changes: 43 additions & 0 deletions python/ray/tests/perf_integration_tests/test_perf_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import numpy as np
import pytest

import ray

num_tasks_submitted = [10**n for n in range(0, 6)]
num_tasks_ids = ["{}_tasks".format(i) for i in num_tasks_submitted]


@ray.remote
def dummy_task(val):
return val


def benchmark_task_submission(num_tasks):
total_tasks = 100000
for _ in range(total_tasks // num_tasks):
ray.get([dummy_task.remote(i) for i in range(num_tasks)])


def warmup():
x = np.zeros(10**6, dtype=np.uint8)
for _ in range(5):
for _ in range(5):
ray.put(x)
for _ in range(5):
ray.get([dummy_task.remote(0) for _ in range(1000)])


@pytest.mark.benchmark
@pytest.mark.parametrize("num_tasks", num_tasks_submitted, ids=num_tasks_ids)
def test_task_submission(benchmark, num_tasks):
num_cpus = 16
ray.init(
num_cpus=num_cpus, object_store_memory=10**7, ignore_reinit_error=True)
# warm up the plasma store
warmup()
benchmark(benchmark_task_submission, num_tasks)
ray.shutdown()