Skip to content

Commit b685973

Browse files
authored
[Ray] Optimize Ray CI execution time and stability (#3102)
1 parent 994aec1 commit b685973

File tree

8 files changed

+358
-312
lines changed

8 files changed

+358
-312
lines changed

.github/workflows/platform-ci.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-latest]
21-
python-version: [3.8-kubernetes, 3.8-hadoop, 3.8-ray, 3.8-ray-dag, 3.8-vineyard, 3.8-dask]
21+
python-version: [3.8-kubernetes, 3.8-hadoop, 3.8-ray, 3.8-ray-deploy, 3.8-ray-dag, 3.8-vineyard, 3.8-dask]
2222
include:
2323
- { os: ubuntu-latest, python-version: 3.8-kubernetes, no-common-tests: 1,
2424
no-deploy: 1, with-kubernetes: "with Kubernetes" }
@@ -28,6 +28,8 @@ jobs:
2828
no-deploy: 1, with-vineyard: "with vineyard" }
2929
- { os: ubuntu-latest, python-version: 3.8-ray, no-common-tests: 1,
3030
no-deploy: 1, with-ray: "with ray" }
31+
- { os: ubuntu-latest, python-version: 3.8-ray-deploy, no-common-tests: 1,
32+
no-deploy: 1, with-ray-deploy: "with ray deploy" }
3133
- { os: ubuntu-latest, python-version: 3.8-ray-dag, no-common-tests: 1,
3234
no-deploy: 1, with-ray-dag: "with ray dag" }
3335
- { os: ubuntu-latest, python-version: 3.8-dask, no-common-tests: 1,
@@ -53,6 +55,7 @@ jobs:
5355
WITH_KUBERNETES: ${{ matrix.with-kubernetes }}
5456
WITH_VINEYARD: ${{ matrix.with-vineyard }}
5557
WITH_RAY: ${{ matrix.with-ray }}
58+
WITH_RAY_DEPLOY: ${{ matrix.with-ray-deploy }}
5659
WITH_RAY_DAG: ${{ matrix.with-ray-dag }}
5760
RUN_DASK: ${{ matrix.run-dask }}
5861
NO_COMMON_TESTS: ${{ matrix.no-common-tests }}
@@ -93,7 +96,7 @@ jobs:
9396
sudo mv /tmp/etcd-download-test/etcdctl /usr/local/bin/
9497
rm -fr /tmp/etcd-$ETCD_VER-linux-amd64.tar.gz /tmp/etcd-download-test
9598
fi
96-
if [ -n "$WITH_RAY" ] || [ -n "$WITH_RAY_DAG" ]; then
99+
if [ -n "$WITH_RAY" ] || [ -n "$WITH_RAY_DAG" ] || [ -n "$WITH_RAY_DEPLOY" ]; then
97100
pip install ray[default]==1.9.2 "protobuf<4"
98101
pip install "xgboost_ray==0.1.5" "xgboost<1.6.0"
99102
fi
@@ -110,6 +113,7 @@ jobs:
110113
WITH_CYTHON: ${{ matrix.with-cython }}
111114
WITH_VINEYARD: ${{ matrix.with-vineyard }}
112115
WITH_RAY: ${{ matrix.with-ray }}
116+
WITH_RAY_DEPLOY: ${{ matrix.with-ray-deploy }}
113117
WITH_RAY_DAG: ${{ matrix.with-ray-dag }}
114118
RUN_DASK: ${{ matrix.run-dask }}
115119
NO_COMMON_TESTS: ${{ matrix.no-common-tests }}
@@ -144,13 +148,31 @@ jobs:
144148
coverage combine build/ && coverage report
145149
fi
146150
if [ -n "$WITH_RAY" ]; then
147-
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s -m ray
151+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s --ignore=mars/deploy/oscar/ -m ray
148152
coverage report
149153
fi
154+
if [ -n "$WITH_RAY_DEPLOY" ]; then
155+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray.py -m ray
156+
mv .coverage build/.coverage.test_ray.file
157+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray_client.py -m ray
158+
mv .coverage build/.coverage.test_ray_client.file
159+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray_fault_injection.py -m ray
160+
mv .coverage build/.coverage.test_ray_fault_injection.file
161+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray_scheduling.py -m ray
162+
mv .coverage build/.coverage.test_ray_scheduling.file
163+
164+
coverage combine build/ && coverage report
165+
fi
150166
if [ -n "$WITH_RAY_DAG" ]; then
151167
export MARS_CI_BACKEND=ray
152-
pytest $PYTEST_CONFIG --durations=0 --timeout=600 -v -s -m ray_dag
153-
coverage report
168+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s -m ray_dag
169+
mv .coverage build/.coverage.ray_dag.file
170+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray_dag.py
171+
mv .coverage build/.coverage.test_ray_dag.file
172+
pytest $PYTEST_CONFIG --durations=0 --timeout=200 -v -s mars/deploy/oscar/tests/test_ray_dag_failover.py
173+
mv .coverage build/.coverage.test_ray_dag_failover.file
174+
175+
coverage combine build/ && coverage report
154176
fi
155177
if [ -n "$RUN_DASK" ]; then
156178
pytest $PYTEST_CONFIG mars/contrib/dask/tests/test_dask.py

mars/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ async def ray_create_mars_cluster(request, check_router_cleaned):
165165
worker_mem = param.get("worker_mem", 256 * 1024**2)
166166
ray_config.update(param.get("config", {}))
167167
client = await new_cluster(
168-
"test_cluster",
169168
supervisor_mem=supervisor_mem,
170169
worker_num=worker_num,
171170
worker_cpu=worker_cpu,

0 commit comments

Comments
 (0)