Skip to content

Commit

Permalink
[ADAG] Fix test_dag_errors (ray-project#46238)
Browse files Browse the repository at this point in the history
We made CompiledDAGRef not a subclass of ObjectRef, and ray.wait() error message changes.

This PR fixes the ray.wait() test failure in test_dag_errors.

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
  • Loading branch information
ruisearch42 committed Jun 25, 2024
1 parent 560d968 commit cdf9098
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion python/ray/dag/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ py_test_module_list(
tags = [
"accelerated_dag",
"exclusive",
"manual",
"no_windows",
"team:core",
],
Expand Down
19 changes: 17 additions & 2 deletions python/ray/dag/tests/experimental/test_accelerated_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import pickle
import random
import re
import sys
import time

Expand Down Expand Up @@ -421,8 +422,22 @@ def f(x):
with pytest.raises(
TypeError,
match=(
"wait\(\) does not support CompiledDAGRef. "
"Please call ray.get\(\) on the CompiledDAGRef to get the result."
re.escape(
"wait() expected a list of ray.ObjectRef or ray.ObjectRefGenerator, "
"got <class 'ray.experimental.compiled_dag_ref.CompiledDAGRef'>"
)
),
):
ray.wait(ref)

with pytest.raises(
TypeError,
match=(
re.escape(
"wait() expected a list of ray.ObjectRef or ray.ObjectRefGenerator, "
"got list containing "
"<class 'ray.experimental.compiled_dag_ref.CompiledDAGRef'>"
)
),
):
ray.wait([ref])
Expand Down

0 comments on commit cdf9098

Please sign in to comment.