diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-08-31 14:59:14 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-08-31 14:59:14 +0200 |
commit | 0886a5fe14195fc105939b477f9ff70b27ae3172 (patch) | |
tree | 91b4e677ff8d0978ece41ee0b9f5a5f6cb1ff3c1 /lib | |
parent | e257251c82b64210dbc17890852d13b43f25c89d (diff) |
model: allow leaf function setting to be overridden via env
Here, it defaults to enabled and can be overridden to disabled
(DFATOOL_DTREE_FUNCTION_LEAVES=0)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/model.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py index 696813e..3f784cc 100644 --- a/lib/model.py +++ b/lib/model.py @@ -255,11 +255,14 @@ class AnalyticModel: for name in self.names: for attr in self.attr_by_name[name].keys(): if tree_required[name].get(attr, False): + with_function_leaves = True + if os.getenv("DFATOOL_DTREE_FUNCTION_LEAVES") == "0": + with_function_leaves = False self.build_dtree( name, attr, self.attr_by_name[name][attr].stats.std_param_lut, - with_function_leaves=False, + with_function_leaves=with_function_leaves, ) else: self.attr_by_name[name][attr].set_data_from_paramfit(paramfit) |