diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-22 13:05:52 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-01-22 13:05:52 +0100 |
commit | 29eb6f2f9a65a876d6d276594cf6107ce57c29a4 (patch) | |
tree | 8bc82159f4c77d240b5b6e03933890b3fbeebb95 | |
parent | 2a8aed73ba35107e35b2343670c01c5f760282b0 (diff) |
Add --skip-param-stats support to analyze-{archive,log}
-rwxr-xr-x | bin/analyze-archive.py | 8 | ||||
-rwxr-xr-x | bin/analyze-kconfig.py | 9 | ||||
-rwxr-xr-x | bin/analyze-log.py | 2 | ||||
-rw-r--r-- | lib/cli.py | 8 |
4 files changed, 17 insertions, 10 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index 4641477..5df8af9 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -408,6 +408,7 @@ if __name__ == "__main__": pta=pta, pelt=args.with_substates, force_tree=args.force_tree, + compute_stats=not args.skip_param_stats, ) constructor_duration = time.time() - constructor_start @@ -424,7 +425,12 @@ if __name__ == "__main__": xv_method, xv_count = args.cross_validate.split(":") xv_count = int(xv_count) xv = CrossValidator( - PTAModel, by_name, parameters, arg_count, force_tree=args.force_tree + PTAModel, + by_name, + parameters, + arg_count, + force_tree=args.force_tree, + compute_stats=not args.skip_param_stats, ) xv.parameter_aware = args.parameter_aware_cross_validation else: diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 7714fdc..76e31dd 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -71,11 +71,6 @@ def main(): help="Show Kconfig symbols which are only present in a single configuration. Must be used with an experiment result directory.", ) 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, metavar="VALUE_OR_MAP", @@ -148,10 +143,6 @@ def main(): args = parser.parse_args() dfatool.cli.sanity_check(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): diff --git a/bin/analyze-log.py b/bin/analyze-log.py index e3ddef8..2dbbfdc 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -96,6 +96,7 @@ def main(): by_name, parameter_names, force_tree=args.force_tree, + compute_stats=not args.skip_param_stats, function_override=function_override, ) @@ -156,6 +157,7 @@ def main(): by_name, parameter_names, force_tree=args.force_tree, + compute_stats=not args.skip_param_stats, ) xv.parameter_aware = args.parameter_aware_cross_validation else: @@ -16,6 +16,9 @@ def sanity_check(args): "--force-tree and DFATOOL_FIT_FOL=1 are mutually exclusive", file=sys.stderr ) sys.exit(1) + if args.skip_param_stats and not args.force_tree: + print("--skip-param-stats requires --force-tree", file=sys.stderr) + sys.exit(1) def print_static(model, static_model, name, attribute, with_dependence=False): @@ -599,6 +602,11 @@ def add_standard_arguments(parser): "rsq : R² Score", ) parser.add_argument( + "--skip-param-stats", + action="store_true", + help="Do not compute param stats that are required for RMT. Use this for high-dimensional feature spaces.", + ) + parser.add_argument( "--force-tree", action="store_true", help="Build regression tree without checking whether static/analytic functions are sufficient.", |