`import torchdrug` will result in GUI of matplotlib use agg
import torchdrug will result in GUI of matplotlib use agg and the figure cant show. In general, the GUI of matplotlib use module://backend_interaggto show figure. Agg is non-GUI backend, so please tell why? In the graph.py, i find the function named visualize to show figure, but i cant find why change it. Hope to get your reply! Thanks!
Tip:
I find a solution to solve this problem.
under the all import, add matplotlib.use('module://backend_interagg') and import matplotlib.
Hi! Sorry for the inconvenience. TorchDrug was mainly developed on non-GUI Linux servers, and agg is a compatible choice for non-GUI machines. We presume the most use of GUI is in Jupyter Notebook. In that case, %matplotlib inline is always required and there is nothing complaining about agg.
We will try to find a better solution that accommodate all machines. Do you have any idea which backend is the most compatible?
if using jupyter notebook or jupyter lab, add the command %matplotlib inline after "from torchdrug import data" maybe useful.