Modify Display Utils

Utilities for collecting/checking fastai user environment

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:

learn.fit(1)
Total time: 00:04

epoch train_loss valid_loss accuracy time
0 0.146324 0.082466 0.971541 00:04

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

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