[AutoTuner] Replace failed metric string "-" with ERROR_METRIC#3940
Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom Mar 3, 2026
Merged
Conversation
When AutoTuner trials fail, sub-metrics (effective_clk_period, num_drc, die_area) were returned as the string "-". This caused TensorBoard HPARAMS to silently drop entire metric columns because of mixed string/numeric data types across trials. Replace "-" with ERROR_METRIC (9e99) in all error return paths so TensorBoard consistently receives numeric values. Also add the missing die_area key in AutoTunerBase.step() invalid config return to match the success path. Fixes The-OpenROAD-Project#3482 Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
Contributor
|
Hi Harsh, Great, thanks! I defer to Jack on the review. |
Contributor
Author
Hi Jeff, Thanks for the update! Sounds good. I’ll wait to hear from Jack regarding the review. |
maliberty
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3482
When AutoTuner trials fail, sub-metrics (
effective_clk_period,num_drc,die_area) were returned as the string"-". This caused TensorBoard HPARAMS to silently drop entire metric columns because of mixed string/numeric data types across trials.Changes
utils.py—calculate_score(): returnERROR_METRICinstead of"-"for all sub-metrics on error/not-founddistributed.py—AutoTunerBase.step(): returnERROR_METRICinstead of"-"for invalid config, and add missingdie_areakey to match the success pathdistributed.py—PPAImprov.evaluate(): returnERROR_METRICinstead of"-"for all sub-metrics on error/not-foundWhy this works
ERROR_METRIC(9e99) is already defined inutils.pyand used for the primary score on failure. TheTensorBoardLogger.log_sweep_metrics()method usesisinstance(value, (int, float))checks — with"-"(string), failed metrics were silently skipped; withERROR_METRIC(float), they are now properly logged.Trade-off
As noted in #3482,
9e99will distort TensorBoard Parallel Coordinates axis scales for failed runs. Users can adjust the Max slider per axis to filter these out.Testing
calculate_score()for ERR, N/A, and success cases — all return consistent numeric typesisinstancecompatibility withTensorBoardLogger@jeffng-or @luarss