Unwanted ouput in Learner.predict

When I detect in loop single labeled image groups by
res = learn.predict(path)
I see in output such blinking useless string:

|----------------------------------------------------------------------------------------------------| 0.00% [0/1 00:00<00:00]

It causes by the Learner method
def with_events(self, f, event_type, ex, final=noop):
try: self(f’before
{event_type}’) ;f()
except ex: self(f’after_cancel_{event_type}’)
finally: self(f’after_{event_type}’) ;final()
How to switch off this output?

Are you referring to the progress bar? I agree that it’s not very useful when predicting on single objects. You could always turn it off:
with learn.no_bar(): learn.predict(x)

1 Like

It works. Thanks!

1 Like