DataCanvasIO / YLearn

YLearn, a pun of "learn why", is a python package for causal inference
https://ylearn.readthedocs.io
Apache License 2.0
391 stars 75 forks source link

Problem about plotting causal graph #31

Closed Vihagle closed 1 year ago

Vihagle commented 2 years ago

Please make sure that this is a bug.

System information

Describe the current behavior

Describe the expected behavior It should ouput a causal graph normally.

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Jupyter notebook.

Are you willing to submit PR?(Yes/No)

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

lixfz commented 2 years ago

is there any Warning when you call plot_causal_graph()?

Vihagle commented 2 years ago

No, it prints nothing...

Vihagle @.***

 

------------------ 原始邮件 ------------------ 发件人: "DataCanvasIO/YLearn" @.>; 发送时间: 2022年8月3日(星期三) 中午1:37 @.>; @.**@.>; 主题: Re: [DataCanvasIO/YLearn] Problem about plotting causal graph (Issue #31)

is there any Warning when you call plot_causal_graph()?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

lixfz commented 2 years ago

Please launch a terminal session in your jupyter, and run command "fdp -V", paste the output here. Thanks!

Vihagle commented 2 years ago

fdp : 无法将“fdp”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1

lixfz commented 2 years ago

The output said that Graphviz is not installed correctly.

As described in YLearn installation, Graphviz is required to plot causal graph in notebook, so install it before running YLearn. See https://graphviz.org/download/ for more details about Graphviz installation.

Vihagle commented 2 years ago

I successfully install graphviz, but I still can't get output...

Vihagle commented 2 years ago

I have found graphviz in my package.

Vihagle commented 2 years ago

Here is output as below when I run command "fdp -V":

fdp - graphviz version 5.0.0 (20220707.1540) libdir = "C:\Graphviz\bin" Activated plugin library: gvplugin_neato_layout.dll Using layout: fdp:neato_layout Activated plugin library: gvplugin_core.dll Using render: dot:core Using device: dot:dot:core The plugin configuration file: C:\Graphviz\bin\config6 was successfully loaded. render : cairo dot dot_json fig gd gdiplus json json0 map mp pic pov ps svg tk vml vrml xdot xdot_json layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi textlayout : textlayout device : bmp canon cmap cmapx cmapx_np dot dot_json emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg json json0 metafile mp pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4 xdot_json loadimage : (lib) bmp eps gd gd2 gif jpe jpeg jpg png ps svg

lixfz commented 2 years ago

Please insert a new cell into your notebook running YLearn, run !fdp -V again. Thanks!

Vihagle commented 2 years ago

Result show as below: fdp - graphviz version 5.0.0 (20220707.1540)

lixfz commented 2 years ago

Can you share the notebook here?

Vihagle commented 2 years ago

Oh!!! I just found I can plot the graph, maybe it has something to do with restarting the computer. .

Vihagle commented 2 years ago

Thanks for your support! ^_^