AnswerDotAI / AnswerDotAI/nbdev
matplotlib outputs text representation instead of figure
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
# Provide a minimally reproducible example
[nbdev-matplotlib-test](https://github.com/idahlke-blacksky/nbdev-matplotlib-test)
[Pages](https://idahlke-blacksky.github.io/nbdev-matplotlib-test)
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 (). 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.
Contributor guide
Research direction
Start by running the linked nbdev-matplotlib-test notebooks with nbdev_docs using different worker counts, then inspect the nbdev_docs entry point and how notebook outputs are collected. Done means every matplotlib figure renders as a figure rather than a text representation, including when the number of figure-containing notebooks exceeds the worker count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, matplotlib, python
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100