I have the same issue with Google Colab and when running on my local Windows 10 development machine (following Setup notes for fastai v1 on Windows 10). The issue does not exist when I run on Google Cloud (following Google Cloud Server Setup).
In case it helps someone identify the cause I have shared my configurations and the error messages below. I ran the following code on each platform:
from fastai import *
from fastai.vision import *
doc(ImageDataBunch)
1 Local Windows 10 Environment
1.1 Setup
=== Software ===
python : 3.7.3
fastai : 1.0.52
fastprogress : 0.1.21
torch : 1.1.0
torch cuda : 10.0 / is available
torch cudnn : 7401 / is enabled
=== Hardware ===
torch devices : 1
- gpu0 : GeForce GTX 1050
=== Environment ===
platform : Windows-10-10.0.17134-SP0
conda env : fastai
python : C:\Users\simon\.conda\envs\fastai\python.exe
sys.path : C:\WINDOWS\system32
C:\Users\simon\.conda\envs\fastai\python37.zip
C:\Users\simon\.conda\envs\fastai\DLLs
C:\Users\simon\.conda\envs\fastai\lib
C:\Users\simon\.conda\envs\fastai
C:\Users\simon\.conda\envs\fastai\lib\site-packages
C:\Users\simon\.conda\envs\fastai\lib\site-packages\IPython\extensions
no nvidia-smi is found
1.2 Result
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-1ca7fede151e> in <module>
----> 1 doc(ImageDataBunch)
~\.conda\envs\fastai\lib\site-packages\fastai\gen_doc\nbdoc.py in doc(elt)
129 use_relative_links = False
130 elt = getattr(elt, '__func__', elt)
--> 131 md = show_doc(elt, markdown=False)
132 if is_fastai_class(elt):
133 md += f'\n\n<a href="{get_fn_link(elt)}" target="_blank" rel="noreferrer noopener">Show in docs</a>'
~\.conda\envs\fastai\lib\site-packages\fastai\gen_doc\nbdoc.py in show_doc(elt, doc_string, full_name, arg_comments, title_level, alt_doc_string, ignore_warn, markdown, show_tests)
114 else: raise Exception(f'doc definition not supported for {full_name}')
115 source_link = get_function_source(elt) if is_fastai_class(elt) else ""
--> 116 test_link, test_modal = get_pytest_html(elt, anchor_id=anchor_id) if show_tests else ('', '')
117 title_level = ifnone(title_level, 2 if inspect.isclass(elt) else 4)
118 doc = f'<h{title_level} id="{anchor_id}" class="doc_header">{name}{source_link}{test_link}</h{title_level}>'
~\.conda\envs\fastai\lib\site-packages\fastai\gen_doc\nbtest.py in get_pytest_html(elt, anchor_id)
55 def get_pytest_html(elt, anchor_id:str)->Tuple[str,str]:
56 md = build_tests_markdown(elt)
---> 57 html = HTMLExporter().markdown2html(md).replace('\n','') # nbconverter fails to parse markdown if it has both html and '\n'
58 anchor_id = anchor_id.replace('.', '-') + '-pytest'
59 link, body = get_pytest_card(html, anchor_id)
TypeError: markdown2html() missing 1 required positional argument: 'source'
2 Google Colab
2.1 Setup
=== Software ===
python : 3.6.7
fastai : 1.0.52
fastprogress : 0.1.21
torch : 1.0.1.post2
nvidia driver : 410.79
torch cuda : 10.0.130 / is available
torch cudnn : 7402 / is enabled
=== Hardware ===
nvidia gpus : 1
torch devices : 1
- gpu0 : 15079MB | Tesla T4
=== Environment ===
platform : Linux-4.14.79+-x86_64-with-Ubuntu-18.04-bionic
distro : #1 SMP Wed Dec 19 21:19:13 PST 2018
conda env : Unknown
python : /usr/bin/python3
sys.path :
/env/python
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/usr/local/lib/python3.6/dist-packages/IPython/extensions
2.2 Result
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-1ca7fede151e> in <module>()
----> 1 doc(ImageDataBunch)
2 frames
/usr/local/lib/python3.6/dist-packages/fastai/gen_doc/nbdoc.py in doc(elt)
129 use_relative_links = False
130 elt = getattr(elt, '__func__', elt)
--> 131 md = show_doc(elt, markdown=False)
132 if is_fastai_class(elt):
133 md += f'\n\n<a href="{get_fn_link(elt)}" target="_blank" rel="noreferrer noopener">Show in docs</a>'
/usr/local/lib/python3.6/dist-packages/fastai/gen_doc/nbdoc.py in show_doc(elt, doc_string, full_name, arg_comments, title_level, alt_doc_string, ignore_warn, markdown, show_tests)
114 else: raise Exception(f'doc definition not supported for {full_name}')
115 source_link = get_function_source(elt) if is_fastai_class(elt) else ""
--> 116 test_link, test_modal = get_pytest_html(elt, anchor_id=anchor_id) if show_tests else ('', '')
117 title_level = ifnone(title_level, 2 if inspect.isclass(elt) else 4)
118 doc = f'<h{title_level} id="{anchor_id}" class="doc_header">{name}{source_link}{test_link}</h{title_level}>'
/usr/local/lib/python3.6/dist-packages/fastai/gen_doc/nbtest.py in get_pytest_html(elt, anchor_id)
55 def get_pytest_html(elt, anchor_id:str)->Tuple[str,str]:
56 md = build_tests_markdown(elt)
---> 57 html = HTMLExporter().markdown2html(md).replace('\n','') # nbconverter fails to parse markdown if it has both html and '\n'
58 anchor_id = anchor_id.replace('.', '-') + '-pytest'
59 link, body = get_pytest_card(html, anchor_id)
TypeError: markdown2html() missing 1 required positional argument: 'source'
3 Google Cloud
3.1 Setup
=== Software ===
python : 3.6.7
fastai : 1.0.52
fastprogress : 0.1.21
torch : 1.0.1.post2
nvidia driver : 410.79
torch cuda : 10.0.130 / is available
torch cudnn : 7402 / is enabled
=== Hardware ===
nvidia gpus : 1
torch devices : 1
- gpu0 : 15079MB | Tesla T4
=== Environment ===
platform : Linux-4.14.79+-x86_64-with-Ubuntu-18.04-bionic
distro : #1 SMP Wed Dec 19 21:19:13 PST 2018
conda env : Unknown
python : /usr/bin/python3
sys.path :
/env/python
/usr/lib/python36.zip
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
/usr/local/lib/python3.6/dist-packages/IPython/extensions
3.2 Result
The doc
function worked fine.
I hope this helps. Let me know what other information would be valuable.
Simon