You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dowhy 0.10.1, calling view_model() on a CausalModel throws an exception when dot isn't available. In dowhy 0.9 this worked fine even when dot was not available.
Steps to reproduce the behavior
Install dowhy 0.10.1 on a computer without graphviz/dot installed. Then run:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\dowhy\utils\plotting.py:48, in plot(causal_graph, layout_prog, causal_strengths, colors, filename, display_plot, figure_size, **kwargs)
47 try:
---> 48 from dowhy.utils.graphviz_plotting import plot_causal_graph_graphviz
50 try:
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\dowhy\utils\graphviz_plotting.py:7
6 import numpy as np
----> 7 import pygraphviz
10 def plot_causal_graph_graphviz(
11 causal_graph: nx.Graph,
12 layout_prog: Optional[str] = None,
(...)
18 figure_size: Optional[Tuple[int, int]] = None,
19 ) -> None:
ModuleNotFoundError: No module named 'pygraphviz'
During handling of the above exception, another exception occurred:
FileNotFoundError Traceback (most recent call last)
File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pydot.py:1923, in Dot.create(self, prog, format, encoding)
1922 try:
-> 1923 stdout_data, stderr_data, process = call_graphviz(
...
-> 1933 raise OSError(*args)
1934 else:
1935 raise
FileNotFoundError: [WinError 2] "dot" not found in path.
Expected behavior
The model is displayed even though dot is not available.
Version information:
DoWhy version 0.10.1
Additional context
One workaround is to explicitly set layout=None when calling view_model. However, it would be nice if the view_model method worked by default, as it used to - one possible fix might be to just set None as the default for layout, instead of the current value of "dot".
The text was updated successfully, but these errors were encountered:
Describe the bug
In dowhy 0.10.1, calling
view_model()
on aCausalModel
throws an exception when dot isn't available. In dowhy 0.9 this worked fine even when dot was not available.Steps to reproduce the behavior
Install dowhy 0.10.1 on a computer without graphviz/dot installed. Then run:
Actual behavior
Expected behavior
The model is displayed even though dot is not available.
Version information:
Additional context
One workaround is to explicitly set
layout=None
when callingview_model
. However, it would be nice if the view_model method worked by default, as it used to - one possible fix might be to just set None as the default for layout, instead of the current value of "dot".The text was updated successfully, but these errors were encountered: