Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:fastai/fastai
- Loading branch information
Showing
30 changed files
with
641 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
--- | ||
|
||
title: utils.mod_display | ||
keywords: | ||
sidebar: home_sidebar | ||
|
||
|
||
--- | ||
<!-- | ||
################################################# | ||
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ### | ||
################################################# | ||
# file to edit: docs_src/utils.mod_display.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="Modify-Display-Utils">Modify Display Utils<a class="anchor-link" href="#Modify-Display-Utils">¶</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>Utilities for collecting/checking <a href="/fastai.html#fastai"><code>fastai</code></a> user environment</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="kn">from</span> <span class="nn">fastai.utils.mod_display</span> <span class="k">import</span> <span class="o">*</span> | ||
</pre></div> | ||
|
||
</div> | ||
</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="progress_disabled_ctx" class="doc_header"><code>class</code> <code>progress_disabled_ctx</code><a href="https://github.com/fastai/fastai/blob/master/fastai/utils/mod_display.py#L10" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#progress_disabled_ctx-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>progress_disabled_ctx</code>(<strong><code>learn</code></strong>:<a href="/basic_train.html#Learner"><code>Learner</code></a>)</p> | ||
</blockquote> | ||
<div class="collapse" id="progress_disabled_ctx-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#progress_disabled_ctx-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>Tests found for <code>progress_disabled_ctx</code>:</p><ul><li><code>pytest -sv tests/test_mod_display.py::test_progress_disabled_ctx</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_mod_display.py#L16" 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>Context manager to disable the progress update bar and Recorder print.</p> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</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><code>learn.fit()</code> will display a progress bar and give the final results once completed:</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">learn</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="output_wrapper"> | ||
<div class="output"> | ||
|
||
<div class="output_area"> | ||
|
||
|
||
<div class="output_html rendered_html output_subarea "> | ||
Total time: 00:04 <p><table border="1" class="dataframe"> | ||
<thead> | ||
<tr style="text-align: left;"> | ||
<th>epoch</th> | ||
<th>train_loss</th> | ||
<th>valid_loss</th> | ||
<th>accuracy</th> | ||
<th>time</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>0</td> | ||
<td>0.146324</td> | ||
<td>0.082466</td> | ||
<td>0.971541</td> | ||
<td>00:04</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</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><a href="/utils.mod_display.html#progress_disabled_ctx"><code>progress_disabled_ctx</code></a> will remove all that update and only show the total time once completed.</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="k">with</span> <span class="n">progress_disabled_ctx</span><span class="p">(</span><span class="n">learn</span><span class="p">)</span> <span class="k">as</span> <span class="n">learn</span><span class="p">:</span> | ||
<span class="n">learn</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="output_wrapper"> | ||
<div class="output"> | ||
|
||
<div class="output_area"> | ||
|
||
<div class="output_subarea output_stream output_stdout output_text"> | ||
<pre>Total time: 00:03 | ||
</pre> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.