From 84a5d8719e029d22ad5c13fc7c13b3c3ffdcc8fd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 22 Sep 2022 12:34:51 +0200 Subject: analyze-kconfig: optionally skip stats computation --- bin/analyze-kconfig.py | 11 +++++++++++ lib/cli.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index b95aded..cbf16e0 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -73,6 +73,11 @@ def main(): action="store_true", help="Build decision tree without checking for analytic functions first. Use this for large kconfig files.", ) + parser.add_argument( + "--skip-param-stats", + action="store_true", + help="Do not compute param stats that are required for RMT. Use this for large kconfig files.", + ) parser.add_argument( "--max-std", type=str, @@ -172,6 +177,10 @@ def main(): args = parser.parse_args() + if args.skip_param_stats and not args.force_tree: + print("--skip-param-stats requires --force-tree", file=sys.stderr) + sys.exit(1) + if args.log_level: numeric_level = getattr(logging, args.log_level.upper(), None) if not isinstance(numeric_level, int): @@ -299,6 +308,7 @@ def main(): parameter_names, force_tree=args.force_tree, max_std=max_std, + compute_stats=not args.skip_param_stats, ) constructor_duration = time.time() - constructor_start logging.debug(f"AnalyticModel(...) took {constructor_duration : 7.1f} seconds") @@ -348,6 +358,7 @@ def main(): parameter_names, force_tree=args.force_tree, max_std=max_std, + compute_stats=not args.skip_param_stats, ) xv.parameter_aware = args.parameter_aware_cross_validation else: diff --git a/lib/cli.py b/lib/cli.py index e0cbc7f..3e8e638 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -126,7 +126,7 @@ def model_quality_table(header, result_lists, info_list): for i, results in enumerate(result_lists): info = info_list[i] buf += " ||| " - if ( + if results is not None and ( info is None or ( key != "energy_Pt" -- cgit v1.2.3