Skip to content

Use scientific notation for best error in logger output#1498

Merged
thinkall merged 4 commits into
mainfrom
copilot/represent-best-error-in-logger
Jan 21, 2026
Merged

Use scientific notation for best error in logger output#1498
thinkall merged 4 commits into
mainfrom
copilot/represent-best-error-in-logger

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 20, 2026

Logger output displays best error=0.0000 for very small error values (e.g., 1e-07), losing precision entirely due to fixed-point formatting with 4 decimal places.

Changes

  • Changed format specifier from {:.4f} to {:.4e} in flaml/automl/automl.py:2973 for both search_state.best_loss and self._state.best_loss

Impact

Before:

at 5.2s,  estimator lgbm's best error=0.0000,  best estimator lgbm's best error=0.0000

After:

at 5.2s,  estimator lgbm's best error=1.2300e-06,  best estimator lgbm's best error=1.2300e-06

Scientific notation preserves precision across all error magnitudes while maintaining 4 significant figures.

Original prompt

This section details on the original issue you should resolve

<issue_title>Represent "best error" in runtime logger instance using scientific notation?</issue_title>
<issue_description>My logger output is full of "best error=0.0000" and I suspect there are digits beyond this which scientific notation could show properly.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: thinkall <3197038+thinkall@users.noreply.github.com>
Copilot AI changed the title [WIP] Update logger to use scientific notation for best error Use scientific notation for best error in logger output Jan 20, 2026
Copilot AI requested a review from thinkall January 20, 2026 04:26
@thinkall thinkall marked this pull request as ready for review January 20, 2026 14:46
@thinkall thinkall merged commit 7ac076d into main Jan 21, 2026
16 checks passed
@thinkall thinkall deleted the copilot/represent-best-error-in-logger branch January 21, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Represent "best error" in runtime logger instance using scientific notation?

3 participants