Module: Inference Engine
InferenceEngine
Create Inference Engine module
Examples:
>>> from promg.modules.inference_engine import InferenceEngine
>>> inference_engine = InferenceEngine()
match_entity_with_batch_position(entity_type, relative_position_type)
Infer the batch position of a specific entity
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_type |
str
|
The type of the entity |
required |
relative_position_type |
str
|
The type of the relative position |
required |
Raises:
Type | Description |
---|---|
ValueError
|
when the entity has not been defined |
Examples:
>>> inference_engine.match_entity_with_batch_position(
>>> entity_type="Box",
>>> relative_position_type="BatchPosition")
Infers the missing AT_POS relation between
(:Box) and (:BatchPosition) nodes using rule shown below
infer_items_propagate_downwards_one_level(entity_type)
Infer items while propagating downwards one level
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_type |
str
|
The type of the entity |
required |
Raises:
Type | Description |
---|---|
ValueError
|
when the entity has not been defined |
Examples:
>>> inference_engine.infer_items_propagate_downwards_one_level(entity_type="Box")
Infers the missing corr relation for the (:Box)
entity using the rule shown below
infer_items_propagate_upwards_multiple_levels(entity_type, is_load=True)
Infer items while propagating upwards multiple levels
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_type |
str
|
The type of the entity |
required |
is_load |
indicating whether we are inferring upwards to load events (true) or unload events (false) |
True
|
Raises:
Type | Description |
---|---|
ValueError
|
when the entity has not been defined |
Examples:
>>> inference_engine.infer_items_propagate_upwards_multiple_levels(entity_type="Box")
Infers the missing corr relation for the (:Box)
entity using the rule shown below
infer_items_propagate_downwards_multiple_level_w_batching(entity_type, relative_position_type)
Infer items while propagating downwards multiple levels with batching
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_type |
str
|
The type of the entity |
required |
relative_position_type |
str
|
The type of the relative position |
required |
Raises:
Type | Description |
---|---|
ValueError
|
when the entity has not been defined in semantic header |
Examples:
>>> inference_engine.infer_items_propagate_downwards_multiple_level_w_batching(
>>> entity_type="Box")
Infers the missing corr relation for the (:Box)
entity using the rule shown below