diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-25 09:39:11 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-10-25 09:39:32 +0200 |
commit | 6016c2ff62c121d07634ec0ca81ca9a019ccf03c (patch) | |
tree | 0027974817e48e901a79f2ea336b6a11c2aa723c | |
parent | ca17ae90c4fe49e578d010671cebb699b3d8a550 (diff) |
model: Set DFATOOL_DTREE_ENABLED=0 to disable dtree support
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lib/model.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -29,3 +29,4 @@ The following variables may be set to alter the behaviour of dfatool components. | `DFATOOL_KCONF_WITH_CHOICE_NODES` | 0, **1** | Treat kconfig choices (e.g. "choice Model → MobileNet / ResNet / Inception") as enum parameters. If enabled, the corresponding boolean kconfig variables (e.g. "Model\_MobileNet") are not converted to parameters. If disabled, all (and only) boolean kconfig variables are treated as parameters. Mostly relevant for analyze-kconfig, eval-kconfig | | `DFATOOL_COMPENSATE_DRIFT` | **0**, 1 | Perform drift compensation for loaders without sync input (e.g. EnergyTrace or Keysight) | | `DFATOOL_DRIFT_COMPENSATION_PENALTY` | 0 .. 100 (default: majority vote over several penalties) | Specify penalty for ruptures.py PELT changepoint petection | +| `DFATOOL_DTREE_ENABLED` | 0, **1** | Use decision trees in get\_fitted diff --git a/lib/model.py b/lib/model.py index 06ff25c..844ec89 100644 --- a/lib/model.py +++ b/lib/model.py @@ -248,6 +248,7 @@ class AnalyticModel: if not self.fit_done: paramfit = ParamFit() + tree_allowed = bool(int(os.getenv("DFATOOL_DTREE_ENABLED", "1"))) tree_required = dict() for name in self.names: @@ -264,7 +265,7 @@ class AnalyticModel: safe_functions_enabled=safe_functions_enabled ): paramfit.enqueue(key, param, args, kwargs) - else: + elif tree_allowed: tree_required[name][attr] = self.attr_by_name[name][ attr ].depends_on_any_param() |