spark.graph_editor.models.graph#
Classes#
Custom reimplementation of NodeViwer use to solve certain bugs. |
|
NodeGraphQt object for building/managing Spark models. |
Module Contents#
- class spark.graph_editor.models.graph.SparkNodeViewer(parent=None, undo_stack=None)[source]#
Bases:
NodeGraphQt.widgets.viewer.NodeViewerCustom reimplementation of NodeViwer use to solve certain bugs.
- class spark.graph_editor.models.graph.SparkNodeGraph(parent=None, **kwargs)[source]#
Bases:
NodeGraphQt.NodeGraphNodeGraphQt object for building/managing Spark models.
- create_node(node_type, name=None, selected=True, color=None, text_color=None, pos=None, push_undo=True, select_node=True)[source]#
- get_nodes_by_map()[source]#
- Return type:
Tuple[List[spark.graph_editor.models.nodes.AbstractNode], List[spark.graph_editor.models.nodes.AbstractNode], List[spark.graph_editor.models.nodes.AbstractNode]]
- load_from_model(config)[source]#
- Parameters:
config (spark.nn.brain.BrainConfig)
- validate_graph()[source]#
Simple graph validation.
Ensures that graph has a single connected component and at least one source and one sink is present in the model.