Skip to content

Commit 3140997

Browse files
committed
added asserts to check codeflare pipeline execution
1 parent d6a737e commit 3140997

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

codeflare/tests/test_and.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ def test_and():
5454

5555
## retrieve node c
5656
out_Xyrefs = ray.get(out_args[node_c])
57+
assert out_Xyrefs
58+
5759
for out_xyref in out_Xyrefs:
5860
x = ray.get(out_xyref.get_Xref())
5961
and_func = ray.get(out_xyref.get_currnoderef()).get_and_func()
62+
assert x.any()
6063
print(x)
6164

6265
ray.shutdown()

codeflare/tests/test_or.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ def test_or():
5858
in_args={node_a: Xy_ref_ptrs}
5959
## execute the codeflare pipeline
6060
out_args = rt.execute_pipeline(pipeline, ExecutionType.FIT, in_args)
61+
assert out_args
6162

6263
## retrieve node b
6364
node_b_out_args = ray.get(out_args[node_b])
6465
b_out_xyref = node_b_out_args[0]
6566
ray.get(b_out_xyref.get_Xref())
6667
b_out_node = ray.get(b_out_xyref.get_currnoderef())
6768
sct_b = b_out_node.get_estimator()
69+
assert sct_b
6870
print(sct_b.feature_importances_)
6971

7072
ray.shutdown()

0 commit comments

Comments
 (0)