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

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-trainers-training-progress-bars-into-a-file%2F44893%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 28, 2023, 10:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-trainers-training-progress-bars-into-a-file%2F44893 "2023-06-28T22:57:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phosseini](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/phosseini/32/26690_2.png) [@phosseini](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fphosseini)%5C
**Post date:** [June 28, 2023, 10:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-trainers-training-progress-bars-into-a-file%2F44893%2F1 "2023-06-28T22:57:22Z")

</div>

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):

 ![Screenshot 2023-06-28 at 2.58.27 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/f/4f4497b0cdf6e287af0805e6702e599217908448.png)

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.

---

<div class="post-metadata">

**Author:** ![mkgs210](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mkgs210](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmkgs210)%5C
**Post date:** [May 6, 2024, 7:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-trainers-training-progress-bars-into-a-file%2F44893%2F2 "2024-05-06T19:39:15Z")

</div>

> [@phosseini](#):
>

I have the same problem, were you able to find a solution?

---

<div class="post-metadata">

**Author:** ![blewis-hir](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@blewis-hir](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fblewis-hir)%5C
**Post date:** [December 5, 2024, 1:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-log-trainers-training-progress-bars-into-a-file%2F44893%2F3 "2024-12-05T13:14:14Z")

</div>

I think that you can monkey patch their use of `tqdm` to use `tqdm_loggable`. I am going to try that myself right now
