diff options
Diffstat (limited to 'lib/automata.py')
-rwxr-xr-x | lib/automata.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/automata.py b/lib/automata.py index b3318e0..ebe1871 100755 --- a/lib/automata.py +++ b/lib/automata.py @@ -3,11 +3,14 @@ from .functions import AnalyticFunction, NormalizationFunction from .utils import is_numeric import itertools +import logging import numpy as np import json import queue import yaml +logger = logging.getLogger(__name__) + def _dict_to_list(input_dict: dict) -> list: return [input_dict[x] for x in sorted(input_dict.keys())] @@ -100,7 +103,7 @@ class PTAAttribute: def __repr__(self): if self.function is not None: return "PTAATtribute<{:.0f}, {}>".format( - self.value, self.function._model_str + self.value, self.function.model_function ) return "PTAATtribute<{:.0f}, None>".format(self.value) @@ -134,8 +137,8 @@ class PTAAttribute: } if self.function: ret["function"] = { - "raw": self.function._model_str, - "regression_args": list(self.function._regression_args), + "raw": self.function.model_function, + "regression_args": list(self.function.model_args), } ret["function_error"] = self.function_error return ret @@ -1305,8 +1308,8 @@ class PTA: "power" ] except KeyError: - print( - "[W] skipping model update of state {} due to missing data".format( + logger.warning( + "skipping model update of state {} due to missing data".format( state.name ) ) @@ -1353,8 +1356,8 @@ class PTA: "timeout" ] except KeyError: - print( - "[W] skipping model update of transition {} due to missing data".format( + logger.warning( + "skipping model update of transition {} due to missing data".format( transition.name ) ) |