Hi! I’m trying to build the documentation for my library and I have two issues:
How do I build the documentation when I don’t want to run a particular notebook, just do it as-is
Reason: It requires google colab to even run, hence want to avoid that particular notebook
When I do build_docs with this notebook, it will fail
------------------
show_doc(Learner.get_preds, default_cls_level=2)
------------------
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-6cef04df2e5a> in <module>
----> 1 show_doc(Learner.get_preds, default_cls_level=2)
NameError: name 'Learner' is not defined
NameError: name 'Learner' is not defined
converting: /media/mldata/fastai2/zach/fastinference/nbs/01_tabular_shap_interp.ipynb
If you’re working with the latest, please git pull from master and try 2 again - I’m guessing you have the same problem as Questions on nbdev. If this doesn’t help, can you share the full nb so I can take a proper look.
For point 1
nbdev will ignore any file that starts with an underscore - is it an option to rename the file, build docs, then put the name back? not great I know )o:
You can do simple exclusions with glob. i.e. this will include all .ipynb files unless they start with 2 nbdev_build_docs --fname=[!2]*.ipynb
So I believe the main issue is they were @patch’s, I solved it by putting a #hide at the top of the problematic cells (in my case, this was perfectly okay)