Cannot use the doc(symbol) functionality

When I use the doc(symbol) in my jupyter notebook, I get a plain text help saying:

vision_learner(dls, arch, normalize=True, n_out=None, pretrained=True, loss_func=None, opt_func=<function Adam at 0x000002D29E720430>, lr=0.001, splitter=None, cbs=None, metrics=None, path=None, model_dir='models', wd=None, wd_bn_bias=False, train_bn=True, moms=(0.95, 0.85, 0.95), cut=None, init=<function kaiming_normal_ at 0x000002D298A8DCA0>, custom_head=None, concat_pool=True, pool=True, lin_ftrs=None, ps=0.5, first_bn=True, bn_final=False, lin_first=False, y_range=None, n_in=3)
Build a vision learner from `dls` and `arch`

To get a prettier result with hyperlinks to source code and documentation, install nbdev: pip install nbdev

nbdev is installed in my environment, and I can import it (just to verify). The version is 2.1.1
Digging deeper, i found that the doc symbol comes from

Source:   
def doc(elt):
    "Try to use doc form nbdev and fall back to `base_doc`"
    try:
        from nbdev.showdoc import doc
        doc(elt)
    except: base_doc(elt)
File:      c:\users\11019\.conda\envs\pytorchenv\lib\site-packages\fastai\torch_core.py

and tries to import doc from nbdev.showdoc. However, nbdev.showdoc does not even export the doc symbol…

The symbols it exports are:
['DocmentTbl', 'ShowDocRenderer', 'BasicMarkdownRenderer', 'show_doc', 'BasicHtmlRenderer', 'showdoc_nm', 'colab_link']

What is it that I am missing?

1 Like

You’re not missing anything – that’s not implemented in nbdev yet! :slight_smile:

I saw you using this functionality in your walkthroughs. Looked amazingly tantalizing. I assume you are running a dev version or something?

Actually it was the old version! V2 is still missing some v1 features. Will be added in a couple of days.

1 Like

Thanks a lot. Grateful for your response.