forked from fastai/fastai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_doc.nbdoc.html
288 lines (197 loc) · 16.7 KB
/
gen_doc.nbdoc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
---
title: gen_doc.nbdoc
keywords: fastai
sidebar: home_sidebar
summary: "Helper function to build the documentation"
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: docs_src/gen_doc.nbdoc.ipynb
# instructions: https://docs.fast.ai/gen_doc_main.html
-->
<div class="container" id="notebook-container">
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Documentation-generator">Documentation generator<a class="anchor-link" href="#Documentation-generator">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Generates documentation for <code>fastai</code> classes, functions, types.<br>
View documentation inside a Jupyter Notebook with <a href="/gen_doc.nbdoc.html#show_doc"><code>show_doc</code></a> or at <a href="http://docs.fast.ai"><code>docs.fast.ai</code></a></p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Show-the-documentation-of-a-function">Show the documentation of a function<a class="anchor-link" href="#Show-the-documentation-of-a-function">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="show_doc" class="doc_header"><code>show_doc</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L103" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#show_doc-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>show_doc</code>(<strong><code>elt</code></strong>, <strong><code>doc_string</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>full_name</code></strong>:<code>str</code>=<strong><em><code>None</code></em></strong>, <strong><code>arg_comments</code></strong>:<code>dict</code>=<strong><em><code>None</code></em></strong>, <strong><code>title_level</code></strong>=<strong><em><code>None</code></em></strong>, <strong><code>alt_doc_string</code></strong>:<code>str</code>=<strong><em><code>''</code></em></strong>, <strong><code>ignore_warn</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>markdown</code></strong>=<strong><em><code>True</code></em></strong>, <strong><code>show_tests</code></strong>=<strong><em><code>True</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="show_doc-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#show_doc-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>show_doc</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Show the documentation of an <code>elt</code> (function, class or enum). <code>doc_string</code> decides if we show the doc string of the element or not, <code>full_name</code> will override the name shown, <code>arg_comments</code> is a dictionary that will then show list the arguments with comments. <code>title_level</code> is the level of the corresponding cell in the TOC, <code>alt_doc_string</code> is a text that can replace the <code>doc_string</code>. <code>ignore_warn</code> will ignore warnings if you pass arguments in <code>arg_comments</code> that don't appear to belong to this function and <code>markdown</code> decides if the return is a Markdown cell or plain text.</p>
<p>Plenty of examples of uses of this cell can been seen through the documentation, and you will want to <em>hide input</em> those cells for a clean final result.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Convenience-functions">Convenience functions<a class="anchor-link" href="#Convenience-functions">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="get_source_link" class="doc_header"><code>get_source_link</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L314" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#get_source_link-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_source_link</code>(<strong><code>file</code></strong>, <strong><code>line</code></strong>, <strong><code>display_text</code></strong>=<strong><em><code>'[source]'</code></em></strong>, <strong>**<code>kwargs</code></strong>) → <code>str</code></p>
</blockquote>
<div class="collapse" id="get_source_link-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#get_source_link-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>get_source_link</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Returns github link for given file</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="show_video" class="doc_header"><code>show_video</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L260" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#show_video-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>show_video</code>(<strong><code>url</code></strong>)</p>
</blockquote>
<div class="collapse" id="show_video-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#show_video-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>show_video</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Display video in <code>url</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="show_video_from_youtube" class="doc_header"><code>show_video_from_youtube</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L265" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#show_video_from_youtube-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>show_video_from_youtube</code>(<strong><code>code</code></strong>, <strong><code>start</code></strong>=<strong><em><code>0</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="show_video_from_youtube-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#show_video_from_youtube-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>show_video_from_youtube</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Display video from Youtube with a <code>code</code> and a <code>start</code> time.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Functions-for-internal-fastai-library-use">Functions for internal fastai library use<a class="anchor-link" href="#Functions-for-internal-fastai-library-use">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="get_exports" class="doc_header"><code>get_exports</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L208" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#get_exports-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_exports</code>(<strong><code>mod</code></strong>)</p>
</blockquote>
<div class="collapse" id="get_exports-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#get_exports-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>get_exports</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Get the exports of <code>mod</code>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="get_fn_link" class="doc_header"><code>get_fn_link</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L282" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#get_fn_link-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_fn_link</code>(<strong><code>ft</code></strong>) → <code>str</code></p>
</blockquote>
<div class="collapse" id="get_fn_link-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#get_fn_link-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>get_fn_link</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Return function link to notebook documentation of <code>ft</code>. Private functions link to source code</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="get_ft_names" class="doc_header"><code>get_ft_names</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L213" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#get_ft_names-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_ft_names</code>(<strong><code>mod</code></strong>, <strong><code>include_inner</code></strong>=<strong><em><code>False</code></em></strong>) → <code>List</code>[<code>str</code>]</p>
</blockquote>
<div class="collapse" id="get_ft_names-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#get_ft_names-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>get_ft_names</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Return all the functions of module <code>mod</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="is_enum" class="doc_header"><code>is_enum</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L29" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#is_enum-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>is_enum</code>()</p>
</blockquote>
<div class="collapse" id="is_enum-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#is_enum-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>is_enum</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Check if something is an enumerator.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="import_mod" class="doc_header"><code>import_mod</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L187" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#import_mod-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>import_mod</code>(<strong><code>mod_name</code></strong>:<code>str</code>, <strong><code>ignore_errors</code></strong>=<strong><em><code>False</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="import_mod-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#import_mod-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>import_mod</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Return module from <code>mod_name</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="link_docstring" class="doc_header"><code>link_docstring</code><a href="https://github.com/fastai/fastai/blob/master/fastai/gen_doc/nbdoc.py#L173" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#link_docstring-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>link_docstring</code>(<strong><code>modules</code></strong>, <strong><code>docstring</code></strong>:<code>str</code>, <strong><code>overwrite</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>) → <code>str</code></p>
</blockquote>
<div class="collapse" id="link_docstring-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#link_docstring-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>link_docstring</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Search <code>docstring</code> for backticks and attempt to link those functions to respective documentation.</p>
</div>
</div>
</div>
</div>
</div>
</div>