Disable Console Progress Bar


Is there a simple way to disable the progress bar (console progress bar) when running ner.batch-train or ner.train-curve? I’ve looked for a quiet mode in the docs but didn’t see anything.

I ask because I do most of my training on GCP; I use the nohup command so training can continue even if I lose my ssh connection. Therefore prodigy’s output gets written to a file: nohup.out. However, this causes each step of the progress bar to be printed out on a new line (see image for clarity), which makes it a pain to find the information I really care about: loss, right, wrong, accuracy etc.

Ah yes, that’s a good point! We should definitely expose the progress bar settings (which uses tqdm btw) in the recipe, so users have more control over it.

I assume you do want all the other output like updates and results, just not the progress bar, right? In the meantime, you could check out the source of the ner.batch-train recipe and how the other printing is implemented (see the print_ helper). Maybe you could just slightly modify that so Prodigy also writes those statements to a file? It’s not as elegant as having it all taken care of by nohup, but it’d at least give you full control over what you want to output when, and how it should be formatted.

Thanks for getting back to me Ines. Exposing the settings sounds like an excellent long term solution. I will take a look at the recipe. As a super quick work around, I’ve found that the ‘\b’ control character is preserved in the nohup.out file, so I can at least just head the file to get fairly readable output.