beanmachine.ppl.compiler.error_report module

This module declares types used for error detection and reporting when compiling Bean Machine models to Bean Machine Graph.

class beanmachine.ppl.compiler.error_report.BMGError

Bases: abc.ABC

class beanmachine.ppl.compiler.error_report.BadMatrixMultiplication(node: beanmachine.ppl.compiler.bmg_nodes.MatrixMultiplicationNode, left_type: beanmachine.ppl.compiler.bmg_types.BMGMatrixType, right_type: beanmachine.ppl.compiler.bmg_types.BMGMatrixType, node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall])

Bases: beanmachine.ppl.compiler.error_report.BMGError

left_type: beanmachine.ppl.compiler.bmg_types.BMGMatrixType
node: beanmachine.ppl.compiler.bmg_nodes.MatrixMultiplicationNode
node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall]
right_type: beanmachine.ppl.compiler.bmg_types.BMGMatrixType
class beanmachine.ppl.compiler.error_report.ErrorReport

Bases: object

add_error(error: beanmachine.ppl.compiler.error_report.BMGError) None
any() bool
errors: List[beanmachine.ppl.compiler.error_report.BMGError]
raise_errors() None
class beanmachine.ppl.compiler.error_report.ImpossibleObservation(node: beanmachine.ppl.compiler.bmg_nodes.Observation, distribution_type: beanmachine.ppl.compiler.bmg_types.BMGLatticeType)

Bases: beanmachine.ppl.compiler.error_report.BMGError

distribution_type: beanmachine.ppl.compiler.bmg_types.BMGLatticeType
node: beanmachine.ppl.compiler.bmg_nodes.Observation
class beanmachine.ppl.compiler.error_report.UnsizableNode(node: beanmachine.ppl.compiler.bmg_nodes.BMGNode, input_sizes: List[torch.Size], node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall])

Bases: beanmachine.ppl.compiler.error_report.BMGError

node: beanmachine.ppl.compiler.bmg_nodes.BMGNode
node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall]
class beanmachine.ppl.compiler.error_report.UnsupportedNode(node: beanmachine.ppl.compiler.bmg_nodes.BMGNode, consumer: beanmachine.ppl.compiler.bmg_nodes.BMGNode, edge: str, node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall])

Bases: beanmachine.ppl.compiler.error_report.BMGError

consumer: beanmachine.ppl.compiler.bmg_nodes.BMGNode
edge: str
node: beanmachine.ppl.compiler.bmg_nodes.BMGNode
node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall]
class beanmachine.ppl.compiler.error_report.UntypableNode(node: beanmachine.ppl.compiler.bmg_nodes.BMGNode, node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall])

Bases: beanmachine.ppl.compiler.error_report.BMGError

node: beanmachine.ppl.compiler.bmg_nodes.BMGNode
node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall]
class beanmachine.ppl.compiler.error_report.Violation(node: beanmachine.ppl.compiler.bmg_nodes.BMGNode, node_type: beanmachine.ppl.compiler.bmg_types.BMGLatticeType, requirement: Union[beanmachine.ppl.compiler.bmg_types.BMGLatticeType, beanmachine.ppl.compiler.bmg_types.BaseRequirement], consumer: beanmachine.ppl.compiler.bmg_nodes.BMGNode, edge: str, node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall])

Bases: beanmachine.ppl.compiler.error_report.BMGError

consumer: beanmachine.ppl.compiler.bmg_nodes.BMGNode
edge: str
node: beanmachine.ppl.compiler.bmg_nodes.BMGNode
node_locations: Set[beanmachine.ppl.compiler.execution_context.FunctionCall]
node_type: beanmachine.ppl.compiler.bmg_types.BMGLatticeType
requirement: Union[beanmachine.ppl.compiler.bmg_types.BMGLatticeType, beanmachine.ppl.compiler.bmg_types.BaseRequirement]