nodes#
Classes#
Abstract node model use to represent different components of a Spark model. |
|
Node representing the input to the system. |
|
Node representing the output of the system. |
|
Abstract node representing a SparkModule. |
Functions#
|
Factory function that creates a new NodeGraphQt node class from an Spark module class. |
Module Contents#
- class nodes.AbstractNode#
Bases:
NodeGraphQt.BaseNode,abc.ABCAbstract node model use to represent different components of a Spark model.
- __identifier__ = 'spark'#
- NODE_NAME = 'Abstract Node'#
- input_specs: dict[str, spark.core.specs.InputSpec]#
- output_specs: dict[str, spark.core.specs.OutputSpec]#
- graph: spark.graph_editor.models.graph.SparkNodeGraph#
- update_io_spec(spec, port_name, payload_type=None, shape=None, dtype=None, description=None)#
Method to update node IO specs. Valid updates are broadcasted.
- Parameters:
spec (str) – str, target spec {input, output}
port_name (str) – str, the name of the port to update
payload_type (type[spark.core.payloads.SparkPayload] | None) – type[SparkPayload] | None, the new payload_type
shape (tuple[int, Ellipsis] | None) – tuple[int, …] | None, the new shape
dtype (jax.typing.DTypeLike | None) – DTypeLike | None, the new dtype
description (str | None) – str | None, the new description
- class nodes.SourceNode#
Bases:
AbstractNodeNode representing the input to the system.
- NODE_NAME = 'Source Node'#
- output_specs#
- class nodes.SinkNode#
Bases:
AbstractNodeNode representing the output of the system.
- NODE_NAME = 'Sink Node'#
- input_specs#
- class nodes.SparkModuleNode#
Bases:
AbstractNode,abc.ABCAbstract node representing a SparkModule.
- NODE_NAME = 'SparkModule'#
- module_cls: type[spark.core.module.SparkModule]#
- node_config: spark.core.config.BaseSparkConfig#
- input_specs#
- output_specs#
- nodes.module_to_nodegraph(entry)#
Factory function that creates a new NodeGraphQt node class from an Spark module class.
- Parameters:
- Return type: