summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/analyze-archive.py4
-rwxr-xr-xbin/analyze-kconfig.py4
-rwxr-xr-xbin/analyze-log.py4
-rw-r--r--doc/modeling-method.md6
-rw-r--r--lib/cli.py2
5 files changed, 12 insertions, 8 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index bb3281a..3da6ec3 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -273,8 +273,8 @@ if __name__ == "__main__":
if args.function_override:
for function_desc in args.function_override.split(";"):
- state_or_tran, attribute, *function_str = function_desc.split(" ")
- function_override[(state_or_tran, attribute)] = " ".join(function_str)
+ state_or_tran, attribute, function_str = function_desc.split(":")
+ function_override[(state_or_tran, attribute)] = function_str
show_quality = args.show_quality
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index 76e31dd..f798277 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -255,8 +255,8 @@ def main():
function_override = dict()
if args.function_override:
for function_desc in args.function_override.split(";"):
- state_or_tran, attribute, *function_str = function_desc.split(" ")
- function_override[(state_or_tran, attribute)] = " ".join(function_str)
+ state_or_tran, attribute, function_str = function_desc.split(":")
+ function_override[(state_or_tran, attribute)] = function_str
by_name, parameter_names = dfatool.utils.observations_to_by_name(observations)
diff --git a/bin/analyze-log.py b/bin/analyze-log.py
index 2dbbfdc..902eb31 100755
--- a/bin/analyze-log.py
+++ b/bin/analyze-log.py
@@ -89,8 +89,8 @@ def main():
function_override = dict()
if args.function_override:
for function_desc in args.function_override.split(";"):
- state_or_tran, attribute, *function_str = function_desc.split(" ")
- function_override[(state_or_tran, attribute)] = " ".join(function_str)
+ state_or_tran, attribute, function_str = function_desc.split(":")
+ function_override[(state_or_tran, attribute)] = function_str
model = AnalyticModel(
by_name,
diff --git a/doc/modeling-method.md b/doc/modeling-method.md
index dab120e..6357cd8 100644
--- a/doc/modeling-method.md
+++ b/doc/modeling-method.md
@@ -44,8 +44,12 @@ All of these are valid regression model trees.
* `DFATOOL_ULS_SKIP_CODEPENDENT_CHECK=1`
* `DFATOOL_REGRESSION_SAFE_FUNCTIONS=1`
-##
+## Least-Squares Regression
+If dfatool determines that there is no need for a tree structure, or if `DFATOOL_DTREE_ENABLED=0` has beenset, it will go straight to least-squares regression.
+By default, it still utilizes the RMT/ULS algorithms to find and fit a suitable function template.
+If needed, `--function-override` can be used to set a function template manually.
+For instance, in order to specify that NMC DPU allocation latency is a function of the number of DPUs (and nothing else), ue `--function-override 'NMC reconfiguration:latency_dpu_alloc_us:regression_arg(0) + regression_arg(1) * parameter(n_dpus)'`
* CART: Regression Trees
* DECART: Regression Trees with exclusively binary features/parameters
diff --git a/lib/cli.py b/lib/cli.py
index 4fc39b6..51f77d3 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -575,7 +575,7 @@ def add_standard_arguments(parser):
)
parser.add_argument(
"--function-override",
- metavar="<name> <attribute> <function>[;<name> <attribute> <function>;...]",
+ metavar="<name>:<attribute>:<function>[;<name>:<attribute>:<function>;...]",
type=str,
help="Manually specify the function to fit for <name> <attribute>. "
"A function specified this way bypasses parameter detection: "