How to log Trainer's training progress bars into a file

I need to log the training progress of the Trainer into a file (I know we can use the report_to argument to send the logs to the supported integrations, but I don’t want to send info to those integrations.) The progress bar I’m referring to is shown in the figure below (which gets updated real-time as the model is being trained/fine-tuned):

How should I do this in the Trainer? When I set the logging from from transformers.utils import logging I can log transformers’s info, but for some reason, the exact progress bar that shows the percentage in the console doesn’t get logged into the file and only gets printed in the console.

1 Like