Long decimals for rounded values in logs #20639
Unanswered
jedick
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wonder if there's a way to round or truncate values in the test logs, specifically the results printed on screen. The logs have many decimal digits for rounded values. Here's a small example:
The screen output looks like this, and the same values are in the CSV file.
This is related to floating-point representation. Decimals that are sums of negative powers of two (1/2 + 1/8 = 0.625) are represented exactly, but 80.1 is represented as 80.0999984741211.
I could just save the unrounded values to CSV and format them myself, but I would like to have cleaner output here as well. I think nice formatting of metrics helps with interpreting results of experiments and sharing with colleagues.
There is a related open discussion but with a different problem (undesired rounding to the nearest integer): #19496
Beta Was this translation helpful? Give feedback.
All reactions