Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 7a1df52

Browse files
amogkamkrfricke
andauthored
Update Ray wheels and increase verbosity for test_colocation (#40)
* show output on test * add * increase timeout * upgrade latest * fix queue actor * fix shutdown * lint * fix * change order of tests * Update xgboost_ray/util.py Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
1 parent bd8c941 commit 7a1df52

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ jobs:
3636
run: |
3737
python -m pip install --upgrade pip
3838
python -m pip install codecov
39-
python -m pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-1.1.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
39+
python -m pip install -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-1.2.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
4040
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
4141
- name: Install package
4242
run: |
4343
python -m pip install -e .
4444
- name: Test with pytest
4545
run: |
4646
pushd xgboost_ray/tests
47+
python -m pytest -vv -s --log-cli-level=DEBUG --durations=0 -x test_colocation.py
4748
python -m pytest -v --durations=0 -x test_matrix.py
4849
python -m pytest -v --durations=0 -x test_xgboost_api.py
4950
python -m pytest -v --durations=0 -x test_fault_tolerance.py
5051
python -m pytest -v --durations=0 -x test_end_to_end.py
5152
python -m pytest -v --durations=0 -x test_tune.py
52-
python -m pytest -v --durations=0 -x test_colocation.py
5353
echo "running smoke test on benchmark_cpu_gpu.py" && python release/benchmark_cpu_gpu.py 2 10 20 --smoke-test
5454
popd
5555
pushd examples/
@@ -82,12 +82,12 @@ jobs:
8282
- name: Test with pytest
8383
run: |
8484
pushd xgboost_ray/tests
85+
python -m pytest -vv -s --log-cli-level=DEBUG --durations=0 -x test_colocation.py
8586
python -m pytest -v --durations=0 -x test_matrix.py
8687
python -m pytest -v --durations=0 -x test_xgboost_api.py
8788
python -m pytest -v --durations=0 -x test_fault_tolerance.py
8889
python -m pytest -v --durations=0 -x test_end_to_end.py
8990
python -m pytest -v --durations=0 -x test_tune.py
90-
python -m pytest -v --durations=0 -x test_colocation.py
9191
echo "running smoke test on benchmark_cpu_gpu.py" && python release/benchmark_cpu_gpu.py 2 10 20 --smoke-test
9292
popd
9393
pushd examples/
@@ -127,11 +127,11 @@ jobs:
127127
- name: Test with pytest
128128
run: |
129129
pushd xgboost_ray/tests
130+
python -m pytest -vv -s --log-cli-level=DEBUG --durations=0 -x test_colocation.py
130131
python -m pytest -v --durations=0 -x test_matrix.py
131132
python -m pytest -v --durations=0 -x test_xgboost_api.py
132133
python -m pytest -v --durations=0 -x test_fault_tolerance.py
133134
python -m pytest -v --durations=0 -x test_end_to_end.py
134-
python -m pytest -v --durations=0 -x test_colocation.py
135135
echo "running smoke test on benchmark_cpu_gpu.py" && python release/benchmark_cpu_gpu.py 2 10 20 --smoke-test
136136
popd
137137
pushd examples/

xgboost_ray/util.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def shutdown(self):
4949

5050
# Remove after Ray 1.2 release.
5151
if getattr(RayQueue, "shutdown", None) is not None:
52-
Queue = RayQueue
5352
from ray.util.queue import _QueueActor
5453
else:
5554
# Have to copy the class here so that we can subclass this for mocking.
@@ -100,16 +99,20 @@ def get_nowait_batch(self, num_items):
10099
f"{self.qsize()}.")
101100
return [self.queue.get_nowait() for _ in range(num_items)]
102101

103-
class Queue(RayQueue):
104-
def __init__(self,
105-
maxsize: int = 0,
106-
actor_options: Optional[Dict] = None) -> None:
107-
actor_options = {} if not actor_options else actor_options
108-
self.maxsize = maxsize
109-
self.actor = ray.remote(_QueueActor).options(
110-
**actor_options).remote(self.maxsize)
111102

112-
def shutdown(self):
103+
# Remove after Ray 1.2 release.
104+
class Queue(RayQueue):
105+
def __init__(self, maxsize: int = 0,
106+
actor_options: Optional[Dict] = None) -> None:
107+
actor_options = actor_options or {}
108+
self.maxsize = maxsize
109+
self.actor = ray.remote(_QueueActor).options(**actor_options).remote(
110+
self.maxsize)
111+
112+
def shutdown(self):
113+
if getattr(RayQueue, "shutdown", None) is not None:
114+
super(Queue, self).shutdown()
115+
else:
113116
if self.actor:
114117
ray.kill(self.actor)
115118
self.actor = None

0 commit comments

Comments
 (0)