Disable *all* fit_one_cycle() output

Hi experts. I need to suppress all output from fit_one_cycle() in a Jupyter notebook. Here’s what I tried:

for i in range(100):
    with learnf.no_bar():
        learnf.fit_one_cycle(3,lr_max=1e-3)

However, you still get output like

[0, 24.50206184387207, 130.83897399902344, '00:00']
[1, 24.49974822998047, 135.68858337402344, '00:00']
[2, 24.482267379760742, 137.36080932617188, '00:00']

Is it possible? Ugly workarounds are acceptable.

Yes, I know there is already a topic about this problem, but it does not conclude with a solution.

Thank you!

Malcolm

Try:

with learn.no_bar(), learn.no_logging():
 ...

It works. Thanks!
:slightly_smiling_face:

1 Like