Note that in these screenshots, I am using Jupyter Notebook in VS Code with its python extensions. But I did try with just vanilla Jupyter Notebook (by runningjupyter notebook --no-browser) and these two methods do not show anything either. So I think this is not a VS Code issue.
I am using fastai v2 installed by conda install -c fastchan fastai.
Do I make some mistake? Anyone know how to make them work? Thanks.
Well that command option (--no-browser) is just to tell it to not automatically open a browser, because the program is running in a Linux environment with no GUI (WSL2). I still need to copy the URL and open it in a browser and see the Jupyter Notebook. It is the original Jupyter Notebook indeed.
Also VS Code is not a “text” oriented environment. It is Electron - essentially a browser. And it can display ipywidgets such as iprogress that fastai uses.
In Jupyter and IPython, anything starting with % is a line magic. If there is %%, then it’s a cell magic. They are convenience commands to do common tasks. In this example it’s setting the matplotlib backend to be inline, or in line with the other inputs and outputs. A matplotlib backend is where the graph is rendered, for example the notebook, a pdf, an svg, or a jpeg.