Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fast.ai: Prevent output during training process

I am training a few ML and DL algorithms to compare performance, however I am unable to find a way to prevent fast.ai from outputting automatically. In Keras-TF, for example, I can say model.fit(X_train, y_train, epochs=100, verbose={0,1,2}. Is there a way I can stop all output from fastai models? (I'm in jupyter notebook, but I can't see why this would change the result much)

This is the fastai training step I'm utilizing: model.fit_one_cycle(cyc_len=10, callbacks=None). And this is the output I'm trying to stop.

fastai training output

I haven't been able to find any notes of a feature like this here, which is where I would expect them.

Additionally, if there are any good resources for fast.ai, please let me know! I've had issues with documentation compared to scikit-learn and keras.

Thank you so much!

like image 855
Clayton Johnson Avatar asked Oct 30 '25 00:10

Clayton Johnson


1 Answers

I think the no_bar and no_logging functions is what you're looking for.

So this will pretty much silence your fitting process:

with model.no_bar(), model.no_logging(): model.fit(...)
like image 88
pagid Avatar answered Nov 01 '25 15:11

pagid