utils.mod_display

Modify Display Utils

Utilities for collecting/checking fastai user environment

  1. from fastai.utils.mod_display import *

class progress_disabled_ctx[source][test]

progress_disabled_ctx(learn:Learner) Tests found for progress_disabled_ctx:

  • pytest -sv tests/test_mod_display.py::test_progress_disabled_ctx [source]

To run tests please refer to this guide.

Context manager to disable the progress update bar and Recorder print.

learn.fit() will display a progress bar and give the final results once completed:

  1. learn.fit(1)

Total time: 00:04

epochtrain_lossvalid_lossaccuracytime
00.1463240.0824660.97154100:04

progress_disabled_ctx will remove all that update and only show the total time once completed.

  1. with progress_disabled_ctx(learn) as learn:
  2. learn.fit(1)
  1. Total time: 00:03

Company logo

©2021 fast.ai. All rights reserved.
Site last generated: Jan 5, 2021