fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.8k stars 484 forks source link

matplotlib outputs text representation instead of figure #1420

Open idahlke-blacksky opened 1 week ago

idahlke-blacksky commented 1 week ago

Provide a minimally reproducible example

nbdev-matplotlib-test Pages

I set up this experiment to reproduce the bug in a shareable environment. The notebooks all have the same plotting code. Note that some of the notebooks show a text representation instead of the rendered figure (<Figure size 640x480 with 1 Axes>). This happens for the last N notebooks anytime the number of notebooks with matplotlib figures exceeds the number of workers passed to nbdev_docs by N. I can locally run nbdev_docs n_workers 1 and force all notebooks except the first to fail. Increasing the number of workers decreases the number of failed notebooks expectedly.

Locally I am setting up with the conda env file, but the problem repeats on github without it.