Module aivis_engine_v2_cn_sdk_python.inference

Classes

class ConstraintNavigatorInference (handle, key)

Class for creating and handling constraint navigator inference. This is your entry point for all inference operations.

Private constructor. To create new instances use any of:

Static methods

def create_by_hub(cls, hub: ConstraintNavigatorHub, config_json: str) ‑> ConstraintNavigatorInference

@FlavourRequirement([Flavour.FULL])

Create constraint navigator inference for given hub handle and config.

To create predictions with this inference instance use:

Parameters

hub : aivis_engine_v2_cn_sdk_python.hub.Hub
Instance of constraint navigator hub
config_json : str
DtoConstraintNavigatorConfig as JSON string

Returns

ConstraintNavigatorInference
Instance of constraint navigator inference
def create_by_hub_model(cls, model_json: str, config_json: str) ‑> ConstraintNavigatorInference

@FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])

Create constraint navigator inference for the given constraint model and config.

To create predictions with this inference instance use any of:

Parameters

model_json : str
DtoHubModel as JSON string
config_json : str
DtoInferenceConfig as JSON string

Returns

ConstraintNavigatorInference
Instance of constraint navigator inference

Methods

def destroy(self)

@FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])

Destroy this constraint navigator inference. It's always safe to destroy an inference. Internally the destruction only takes place after all references to this object have been released.

def get_data_specification(self) ‑> str

@FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])

Get this inference's DtoInferenceDataSpecification

Returns

str
DtoInferenceDataSpecification as JSON string
def infer_float(self, data: ConstraintNavigatorData, timestamps: List[int]) ‑> List[DtoFloatConstraintValues]

@FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])

For given data and timestamps, calculate the inference on the float valued models within the hub model. The result will be a list of DtoFloatConstraintValues instances corresponding to given timestamps. Make sure to fill the ConstraintNavigatorData with all data needed for calculation. Check the constraint hub model's inference data specification for needed signals and time ranges.

Parameters

data :  ConstraintNavigatorData
Instance of constraint navigator data
timestamps : List[int]
List of timestamps

Returns

List[DtoFloatConstraintValues]
List of enhanced float data points
def infer_float_with_next_normal(self, data: ConstraintNavigatorData, timestamps: List[int], config_json: str) ‑> List[DtoFloatConstraintValuesWithNextNormal]

@FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])

For given data, timestamps and next normal config, calculate the inference and the closest point that satisfies the given conditions on the float valued models within the hub model. The result will be a list of DtoFloatConstraintValuesWithNextNormal instances corresponding to given timestamps. Make sure to fill the ConstraintNavigatorData with all data needed for calculation. Check the constraint model's inference data specification for needed signals and time ranges.

Parameters

data :  ConstraintNavigatorData
Instance of constraint navigator data
timestamps : List[int]
List of timestamps
config_json : str
DtoFloatNextNormalConfig as JSON string

Returns

List[DtoFloatConstraintValuesWithNextNormal]
List of enhanced float data points