NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
478 stars 168 forks source link

Control verbosity level of stdout #435

Closed druidance closed 3 weeks ago

druidance commented 1 month ago

Is your feature request related to a problem? Please describe. Firstly, let's assume the output of parallel_stereo is redirected to a file. Then, if parallel_stereo is left running for hours or even days, one gets a huge log file sizing a few GB. Analyzing such a huge file is time consuming and tedious.

Describe the solution you'd like Add a command-line flag that will control verbosity. For example: -v will output only general messages (stages running, warnings?) -vv will provide details (+ info about sub-stages) -vvv will provide full details (+ progress bars per each sub-stage as it is right now)

Describe alternatives you've considered It seems it's either suppress all the output or have it all.

oleg-alexandrov commented 1 month ago

A command line option would be nice. For now we have a config file option that seems to go all the way to level 0, which means no messages. https://stereopipeline.readthedocs.io/en/latest/installation.html#settings-optimization

Did you get a few GB of log though? Is it possible to tell which the worst offenders were?

druidance commented 4 weeks ago

@oleg-alexandrov, thank you for the prompt reply and sorry for the delay with response from my side.

To me, the progress bar takes the most space. For example:

--> Triangulating: [..............................................] 0%
--> Triangulating: [**............................................] 6%
--> Triangulating: [*****.........................................] 12%
--> Triangulating: [********......................................] 19%
--> Triangulating: [***********...................................] 25%
--> Triangulating: [**************................................] 31%
--> Triangulating: [*****************.............................] 38%
--> Triangulating: [********************..........................] 44%
--> Triangulating: [***********************.......................] 50%
--> Triangulating: [*************************.....................] 56%
--> Triangulating: [****************************..................] 62%
--> Triangulating: [*******************************...............] 69%
--> Triangulating: [**********************************............] 75%
--> Triangulating: [*************************************.........] 81%
--> Triangulating: [****************************************......] 88%
--> Triangulating: [*******************************************...] 94%
--> Triangulating: [**********************************************] 100%
--> Triangulating: [*****************************************] Complete!

As for the file size, I did get only 107MB but it corresponds to only 1/12 of the whole batch of processed files.

oleg-alexandrov commented 4 weeks ago

You can see if this works for you:

Turn off all progress bars to the console (not recommended).# 0 = *.progress

That is from: https://stereopipeline.readthedocs.io/en/latest/installation.html#settings-optimization

I put it on my to-do list to have a verbosity switch, but I don't know when I will get to it.

On Sat, Jun 1, 2024 at 11:40 PM druidance @.***> wrote:

@oleg-alexandrov https://github.com/oleg-alexandrov, thank you for the prompt reply and sorry for the delay with response from my side.

To me, the progress bar takes the most space. For example:

--> Triangulating: [..............................................] 0% --> Triangulating: [............................................] 6% --> Triangulating: [*.........................................] 12% --> Triangulating: [****......................................] 19% --> Triangulating: [*****...................................] 25% --> Triangulating: [**................................] 31% --> Triangulating: [*.............................] 38% --> Triangulating: [****..........................] 44% --> Triangulating: [***.......................] 50% --> Triangulating: [*.....................] 56% --> Triangulating: [****..................] 62% --> Triangulating: [***...............] 69% --> Triangulating: [**............] 75% --> Triangulating: [*.........] 81% --> Triangulating: [****......] 88% --> Triangulating: [***...] 94% --> Triangulating: [**] 100% --> Triangulating: [*****] Complete!

As for the file size, I did get only 107MB but it corresponds to only 1/12 of the whole batch of processed files.

— Reply to this email directly, view it on GitHub https://github.com/NeoGeographyToolkit/StereoPipeline/issues/435#issuecomment-2143721027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKDU3EXEFPM5N5D7UI2WETZFK45PAVCNFSM6AAAAABIDMF3W2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTG4ZDCMBSG4 . You are receiving this because you were mentioned.Message ID: @.***>

druidance commented 3 weeks ago

Thank you for the workaround! :handshake: