Fastai v2 notebook tools (docs/tests/module building)

Wiki topic for discussing all the tooling based on notebooks (tests, docs, and module creation).

1 Like

Just found out that clicking on source for GrandParentSplitter inside docs, takes us to RandomSplitter and not GrandParentSplitter source code, how can I fix that?

The notebooks only have anchors on each heading, so the ‘source’ link can only link to the nearest heading.

@sgugger would it be better if we linked to the exact line number in the github module file, instead of the notebook?

The source link doesn’t take you to RandomSplitter but to the first header before (the anchor is #Split if you look at the URL generated).

@jeremy Maybe we should provide two links, one to the library on github (exact line in this case) and one to the notebook (first header before) so that people can pick and choose?

I think it’s better to go to GitHub, since that has hyperlinked navigation between all symbols. The prose and outputs from the notebook are already shown in the docs, so I don’t see much of a benefit of linking to the notebook.

How did you generate notebook/ if it comes from 90_notebook_core.ipynb which doesn’t have the notebook2script function? Also, notebook2script seems to be defined in 91_notebook_export.ipyn which has
from local.notebook.core import *
in the first cell (which once again goes back to 90_notebook_core.ipynb ). Hope this makes sense.

core was actually generated after export for refactoring.

1 Like