forked from fastai/fastai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datasets.html
393 lines (268 loc) · 24.7 KB
/
datasets.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
---
keywords: fastai
sidebar: home_sidebar
---
<!--
#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: docs_src/datasets.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="datasets">datasets<a class="anchor-link" href="#datasets">¶</a></h2>
</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>This module has the necessary functions to be able to download several useful datasets that we might be interested in using in our models.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
</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 ">
<h2 id="URLs" class="doc_header"><code>class</code> <code>URLs</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L8" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#URLs-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>URLs</code>()</p>
</blockquote>
<div class="collapse" id="URLs-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#URLs-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>URLs</code>:</p><p>Some other tests where <code>URLs</code> is used:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L43" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Global constants for dataset and model URLs.</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">
<p>This contains all the datasets' and models' URLs, and some classmethods to help use them - you don't create objects of this class. The supported datasets are (with their calling name): <code>S3_NLP</code>, <code>S3_COCO</code>, <code>MNIST_SAMPLE</code>, <code>MNIST_TINY</code>, <code>IMDB_SAMPLE</code>, <code>ADULT_SAMPLE</code>, <code>ML_SAMPLE</code>, <code>PLANET_SAMPLE</code>, <code>CIFAR</code>, <code>PETS</code>, <code>MNIST</code>. To get details on the datasets you can see the <a href="http://course.fast.ai/datasets">fast.ai datasets webpage</a>. Datasets with SAMPLE in their name are subsets of the original datasets. In the case of MNIST, we also have a TINY dataset which is even smaller than MNIST_SAMPLE.</p>
<p>Models is now limited to <code>WT103</code> but you can expect more in the future!</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">URLs</span><span class="o">.</span><span class="n">MNIST_SAMPLE</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>'http://files.fast.ai/data/examples/mnist_sample'</pre>
</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="Downloading-Data">Downloading Data<a class="anchor-link" href="#Downloading-Data">¶</a></h2>
</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>For the rest of the datasets you will need to download them with <a href="/datasets.html#untar_data"><code>untar_data</code></a> or <a href="/datasets.html#download_data"><code>download_data</code></a>. <a href="/datasets.html#untar_data"><code>untar_data</code></a> will decompress the data file and download it while <a href="/datasets.html#download_data"><code>download_data</code></a> will just download and save the compressed file in <code>.tgz</code> format.</p>
<p>The locations where the data and models are downloaded are set in <code>config.yml</code>, which by default is located in <code>~/.fastai</code>. This directory can be changed via the optional environment variable <code>FASTAI_HOME</code> (e.g FASTAI_HOME=/home/.fastai).</p>
<p>If no <code>config.yml</code> is present in the specified directory, a default one will be created with <code>data_archive_path</code>, <code>data_path</code> and <code>models_path</code> entries. The <code>data_path</code> and <code>models_path</code> entries point respectively to <a href="/tabular.data.html#tabular.data"><code>data</code></a> folder and <a href="/tabular.models.html#tabular.models"><code>models</code></a> folder in the same directory as <code>config.yml</code>. The <code>data_archive_path</code> allows you to set a separate folder to save compressed datasets for archiving purposes. It defaults to the same directory as <code>data_path</code>.</p>
<p>Configure those download locations by editing <code>data_archive_path</code>, <code>data_path</code> and <code>models_path</code> in <code>config.yml</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="untar_data" class="doc_header"><code>untar_data</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L221" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#untar_data-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>untar_data</code>(<strong><code>url</code></strong>:<code>str</code>, <strong><code>fname</code></strong>:<code>PathOrStr</code>=<strong><em><code>None</code></em></strong>, <strong><code>dest</code></strong>:<code>PathOrStr</code>=<strong><em><code>None</code></em></strong>, <strong><code>data</code></strong>=<strong><em><code>True</code></em></strong>, <strong><code>force_download</code></strong>=<strong><em><code>False</code></em></strong>) → <code>Path</code></p>
</blockquote>
<div class="collapse" id="untar_data-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#untar_data-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>untar_data</code>:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_load_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L26" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L42" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_vision_data.py::test_trunc_download</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_vision_data.py#L165" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>untar_data</code> is used:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L43" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Download <code>url</code> to <code>fname</code> if <code>dest</code> doesn't exist, and un-tgz to folder <code>dest</code>.</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">
<p>In general, <a href="/datasets.html#untar_data"><code>untar_data</code></a> uses a <code>url</code> to download a <code>tgz</code> file under <code>fname</code>, and then un-tgz <code>fname</code> into a folder under <code>dest</code>.</p>
<p>If you have run <a href="/datasets.html#untar_data"><code>untar_data</code></a> before, then running <code>untar_data(URLs.something)</code> again will just return you <code>dest</code> without downloading again.</p>
<p>If you have run <a href="/datasets.html#untar_data"><code>untar_data</code></a> before, then running <a href="/datasets.html#untar_data"><code>untar_data</code></a> again with <code>force_download=True</code> or the tgz file under <code>fname</code> being corrupted somehow, will remove the existing <code>fname</code> and <code>dest</code> and start downloading again.</p>
<p>If you have run <a href="/datasets.html#untar_data"><code>untar_data</code></a> before, but <code>dest</code> does not exist, meaning no folder under <code>dest</code> exist (the folder could be removed or renamed somehow), then running <code>untar_data(URLs.something)</code> again will execute <a href="/datasets.html#download_data"><code>download_data</code></a>. Furthermore, if the tgz file under <code>fname</code> does exist, then there will be no actual downloading rather than un-tgz <code>fname</code> into <code>dest</code>; if <code>fname</code> does not exist, then downloading for the tgz file will be actually executed.</p>
<p><strong>Note</strong>: the <code>url</code> you feed to <a href="/datasets.html#untar_data"><code>untar_data</code></a> must be one of <code>URLs.something</code>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">untar_data</span><span class="p">(</span><span class="n">URLs</span><span class="o">.</span><span class="n">PLANET_SAMPLE</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>PosixPath('/home/ubuntu/.fastai/data/planet_sample')</pre>
</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="download_data" class="doc_header"><code>download_data</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L206" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#download_data-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>download_data</code>(<strong><code>url</code></strong>:<code>str</code>, <strong><code>fname</code></strong>:<code>PathOrStr</code>=<strong><em><code>None</code></em></strong>, <strong><code>data</code></strong>:<code>bool</code>=<strong><em><code>True</code></em></strong>, <strong><code>ext</code></strong>:<code>str</code>=<strong><em><code>'.tgz'</code></em></strong>) → <code>Path</code></p>
</blockquote>
<div class="collapse" id="download_data-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#download_data-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>download_data</code>:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_load_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L26" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L42" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>download_data</code> is used:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L43" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Download <code>url</code> to destination <code>fname</code>.</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">
<p>Note: If the data file already exists in a <code>data</code> directory inside the notebook, that data file will be used instead of the one present in the folder specified in <code>config.yml</code>. <code>config.yml</code> is located in the directory specified in optional environment variable <code>FASTAI_HOME</code> (defaults to <code>~/.fastai/</code>). Paths are resolved by calling the function <a href="/datasets.html#datapath4file"><code>datapath4file</code></a> - which checks if data exists locally (<code>data/</code>) first, before downloading to the folder specified in <code>config.yml</code>.</p>
<p>Example:</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">download_data</span><span class="p">(</span><span class="n">URLs</span><span class="o">.</span><span class="n">PLANET_SAMPLE</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_text output_subarea output_execute_result">
<pre>PosixPath('/home/ubuntu/.fastai/data/planet_sample.tgz')</pre>
</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="datapath4file" class="doc_header"><code>datapath4file</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L199" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#datapath4file-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>datapath4file</code>(<strong><code>filename</code></strong>, <strong><code>ext</code></strong>:<code>str</code>=<strong><em><code>'.tgz'</code></em></strong>, <strong><code>archive</code></strong>=<strong><em><code>True</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="datapath4file-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#datapath4file-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>datapath4file</code>:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_load_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L26" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L42" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Return data path to <code>filename</code>, checking locally first then in the config file.</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">
<p>All the downloading functions use this to decide where to put the tgz and expanded folder. If <code>filename</code> already exists in a <code>data</code> directory in the same place as the calling notebook/script, that is used as the parent directly, otherwise <code>config.yml</code> is read to see what path to use, which defaults to <code>~/.fastai/data</code> is used. To override this default, simply modify the value in your <code>config.yml</code>:</p>
<pre><code>data_archive_path: ~/.fastai/data
data_path: ~/.fastai/data
</code></pre>
<p><code>config.yml</code> is located in the directory specified in optional environment variable <code>FASTAI_HOME</code> (defaults to <code>~/.fastai/</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="url2path" class="doc_header"><code>url2path</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L186" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#url2path-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>url2path</code>(<strong><code>url</code></strong>, <strong><code>data</code></strong>=<strong><em><code>True</code></em></strong>, <strong><code>ext</code></strong>:<code>str</code>=<strong><em><code>'.tgz'</code></em></strong>)</p>
</blockquote>
<div class="collapse" id="url2path-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#url2path-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>url2path</code>:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_load_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L26" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L42" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Change <code>url</code> to a path.</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 ">
<h2 id="Config" class="doc_header"><code>class</code> <code>Config</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L129" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Config-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>Config</code>()</p>
</blockquote>
<div class="collapse" id="Config-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Config-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>Config</code>:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_creates_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L15" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_default_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L29" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_load_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L26" class="source_link" style="float:right">[source]</a></li><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L42" class="source_link" style="float:right">[source]</a></li></ul><p>Some other tests where <code>Config</code> is used:</p><ul><li><code>pytest -sv tests/test_datasets.py::test_user_config</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_datasets.py#L43" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Creates a default config file 'config.yml' in $FASTAI_HOME (default <code>~/.fastai/</code>)</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">
<p>You probably won't need to use this yourself - it's used by <code>URLs.datapath4file</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="Config.get_path" class="doc_header"><code>get_path</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L144" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Config-get_path-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>get_path</code>(<strong><code>path</code></strong>)</p>
</blockquote>
<div class="collapse" id="Config-get_path-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Config-get_path-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>get_path</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>Get the <code>path</code> in the config file.</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">
<p>Get the key corresponding to <code>path</code> in the <a href="/datasets.html#Config"><code>Config</code></a>.</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="Config.data_path" class="doc_header"><code>data_path</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L149" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Config-data_path-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>data_path</code>()</p>
</blockquote>
<div class="collapse" id="Config-data_path-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Config-data_path-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>data_path</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>Get the path to data in the config file.</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">
<p>Get the <code>Path</code> where the data is stored.</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="Config.model_path" class="doc_header"><code>model_path</code><a href="https://github.com/fastai/fastai/blob/master/fastai/datasets.py#L159" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Config-model_path-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>model_path</code>()</p>
</blockquote>
<div class="collapse" id="Config-model_path-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Config-model_path-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>model_path</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>Get the path to fastai pretrained models in the config file.</p>
</div>
</div>
</div>
</div>
</div>
</div>