How to use the fastprogress.fastprogress.NO_BAR function in fastprogress

To help you get started, we’ve selected a few fastprogress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fastai / fastai / fastai / utils / mod_display.py View on Github external
def __enter__(self):
        #silence progress bar
        fastprogress.fastprogress.NO_BAR = True
        fastai.basic_train.master_bar,fastai.basic_train.progress_bar = force_console_behavior()
        self.orig_callback_fns = copy(self.learn.callback_fns)
        rec_name = [x for x in self.learn.callback_fns if hasattr(x, 'func') and x.func == Recorder]
        if len(rec_name):
            rec_idx = self.learn.callback_fns.index(rec_name[0])
            self.learn.callback_fns[rec_idx] = partial(Recorder, add_time=True, silent=True) #silence recorder
        return self.learn