Skip to content

Commit dbb322d

Browse files
committed
fix
Signed-off-by: zhilong <[email protected]>
1 parent 3d64351 commit dbb322d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

python/ray/dag/compiled_dag_node.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,10 @@ def visualize(
26502650
"Parameters 'channel_details' are"
26512651
" not compatible with 'ascii' format."
26522652
)
2653-
return self._visualize_ascii()
2653+
ascii_visualiztion_str = self._visualize_ascii()
2654+
if view:
2655+
print(ascii_visualiztion_str)
2656+
return ascii_visualiztion_str
26542657
try:
26552658
import graphviz
26562659
except ImportError:

python/ray/dag/tests/experimental/test_dag_visualization.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77

88
import pytest
99

10+
1011
def cleanup_files(filename: str):
1112
"""Helper function to delete files generated during the test."""
12-
for ext in ['','.png', '.pdf', '.jpeg', '.dot']:
13+
for ext in ["", ".png", ".pdf", ".jpeg", ".dot"]:
1314
file_path = filename + ext
1415
if os.path.exists(file_path):
1516
os.remove(file_path)
1617

18+
1719
def test_visualize_basic(ray_start_regular):
1820
"""
1921
Expect output or dot_source:

0 commit comments

Comments
 (0)