deseasion.backend.models.processing_model_utils module

deseasion.backend.models.processing_model_utils.evaluate_continuous_rule(data, rule, stats=None)

Evaluate the continuous model rule with the data.

Args:
data (list): A JSON-serializable list of dict to use as the input for

the rules.

rule (str): A Python code. stats (dict): A dictionary with the statistics on the global attributes

Returns:

A list of dict.

deseasion.backend.models.processing_model_utils.evaluate_discrete_rule(data, rule, stats=None)

Evaluate the discrete model rule with the data.

Args:
data (list): A JSON-serializable list of dict to use as the input for

the rules.

rule (str): A Python code.

Returns:

A list of booleans.

deseasion.backend.models.processing_model_utils.execute_sandbox(script_name, json_input=None)

Execute the script in a sandbox.

Args:

script_name – The filename of the script. json_input – The data the use as input in the script.

deseasion.backend.models.processing_model_utils.load_json_bytes(bytes_data)

Loads a json bytes object.

Raises:

ProcessingError if the json data has an ‘error’ key or an unknown key.