From dfa508d0bddabd3e64ad86693b2c25537613bed8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 1 Dec 2021 14:25:51 +0100 Subject: move some standard arguments to cli helper class --- bin/analyze-archive.py | 19 +------------------ bin/analyze-kconfig.py | 18 +----------------- 2 files changed, 2 insertions(+), 35 deletions(-) (limited to 'bin') diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index f1b9f71..b29091d 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -362,6 +362,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=__doc__ ) + dfatool.cli.add_standard_arguments(parser) parser.add_argument( "--info", action="store_true", @@ -448,12 +449,6 @@ if __name__ == "__main__": help="Export power traces of all states and transitions to DIRECTORY. " "Creates a JSON file for each state and transition.", ) - parser.add_argument( - "--export-dref", - metavar="FILE", - type=str, - help="Export model and model quality to LaTeX dataref file", - ) parser.add_argument( "--filter-param", metavar="=[,=...]", @@ -469,18 +464,6 @@ if __name__ == "__main__": default="warning", help="Set log level", ) - parser.add_argument( - "--cross-validate", - metavar=":", - type=str, - help="Perform cross validation when computing model quality. " - "Only works with --show-quality=table at the moment.", - ) - parser.add_argument( - "--parameter-aware-cross-validation", - action="store_true", - help="Perform parameter-aware cross-validation: ensure that parameter values (and not just observations) are mutually exclusive between training and validation sets.", - ) parser.add_argument( "--with-safe-functions", action="store_true", diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index d4b87c6..bd9cccb 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -27,6 +27,7 @@ def main(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=__doc__ ) + dfatool.cli.add_standard_arguments(parser) parser.add_argument( "--show-failing-symbols", action="store_true", @@ -65,12 +66,6 @@ def main(): help="Export kconfig-webconf NFP model to file", metavar="FILE", ) - parser.add_argument( - "--export-dref", - type=str, - help="Export model and model quality to LaTeX dataref file", - metavar="FILE", - ) parser.add_argument( "--config", type=str, @@ -92,17 +87,6 @@ def main(): help="Restrict model generation to N random samples", metavar="N", ) - parser.add_argument( - "--cross-validate", - type=str, - help="Report modul accuracy via Cross-Validation", - metavar="METHOD:COUNT", - ) - parser.add_argument( - "--parameter-aware-cross-validation", - action="store_true", - help="Perform parameter-aware cross-validation: ensure that parameter values (and not just observations) are mutually exclusive between training and validation sets.", - ) parser.add_argument( "--show-model", choices=["static", "paramdetection", "param", "all", "tex", "html"], -- cgit v1.2.3