TorchStudio / torchstudio

IDE for PyTorch and its ecosystem
https://torchstudio.ai
MIT License
383 stars 27 forks source link

Model graph not rendered #18

Closed jplasser closed 2 years ago

jplasser commented 2 years ago

Just tried some basic stuff on Win 10 and everything worked nicely (tutorial 1), except that I can’t see any model graph. No error message either (is there a log?), the pane just says: “No Graph”.

I’m on ver 0.9.5

divideconcept commented 2 years ago

Indeed it's missing a log system, next update will add that. Regarding your issue, after you built the model, do you have a green status just above the Build button, stating the number of parameters of the model ?

jplasser commented 2 years ago

The green status ist there, yes! It says: Model built (1,199,882 parameters)

divideconcept commented 2 years ago

@jplasser Can you install TorchStudio 0.9.6, run it, build a model, and if it still doesn't display a graph, can you upload here the log files located in %USERPROFILE%\TorchStudio\logs ?

jplasser commented 2 years ago

@divideconcept now I can see the problem in the logs, thank you! It’s not on your side, a group policy blocks graphdisplay on my system.

15:12:03.176 INFO  build: "Model 1" "Loading PyTorch...\n\n" ""
15:12:06.026 INFO  build: "Model 1" "Build script connected\n\n" ""
15:12:06.047 INFO  build: "Model 1" "Building model...\n\n" ""
15:12:06.227 INFO  build: "Model 1" "Building graph...\n\n" ""
15:12:06.259 INFO  build: "Model 1" "" "Model built (1,199,882 parameters)\n"
15:12:06.299 INFO  inference: "Setting torchscript model...\n\n" ""
15:12:06.505 INFO  graphdisplay: "Dieses Programm wurde durch eine Gruppenrichtlinie geblockt. Wenden Sie sich an den Systemadministrator, um weitere Informationen zu erhalten.\r\nTraceback (most recent call last):\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\python\\lib\\runpy.py\", line 197, in _run_module_as_main\n" ""
15:12:06.506 INFO  build end: "Model 1" "" ""
15:12:06.508 INFO  graphdisplay: "    return _run_code(code, main_globals, None,\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\python\\lib\\runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\torchstudio\\graphdraw.py\", line 626, in <module>\n    svg=graph.pipe(format='svg')\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\python\\lib\\site-packages\\graphviz\\files.py\", line 136, in pipe\n    out = backend.pipe(self._engine, format, data,\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\python\\lib\\site-packages\\graphviz\\backend.py\", line 246, in pipe\n" ""
15:12:06.511 INFO  graphdisplay: "    out, _ = run(cmd, input=data, capture_output=True, check=True, quiet=quiet)\n  File \"C:\\Users\\lrcuplj\\TorchStudio\\python\\lib\\site-packages\\graphviz\\backend.py\", line 185, in run\n    raise CalledProcessError(proc.returncode, cmd,\ngraphviz.backend.CalledProcessError: Command '['dot.bat', '-Tsvg']' returned non-zero exit status 1. [stderr: b'Dieses Programm wurde durch eine Gruppenrichtlinie geblockt. Wenden Sie sich an den Systemadministrator, um weitere Informationen zu erhalten.\\r\\n']\n" ""
15:12:06.517 INFO  graph disconnected
15:12:06.535 INFO  inference: "Setting torchscript model...\n\n" ""
15:12:06.560 INFO  graphdisplay end: "" ""
15:12:06.583 INFO  inference: "Setting torchscript model...\n\n" ""

Thank you for your support!

divideconcept commented 2 years ago

I see. Yeah it's a good thing to have this logging system finally implemented ;) The graph display relies on the graphviz python package which itself needs to execute an external renderer utility. Looks like this is the blocking point.