spark.graph_editor.models.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 spark.graph_editor.models.nodes.AbstractNode[source]#
Bases:
NodeGraphQt.BaseNode,abc.ABCAbstract node model use to represent different components of a Spark model.
- input_specs: dict[str, spark.core.specs.PortSpecs][source]#
- output_specs: dict[str, spark.core.specs.PortSpecs][source]#
- update_io_spec(spec, port_name, payload_type=None, shape=None, dtype=None, description=None)[source]#
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 spark.graph_editor.models.nodes.SourceNode[source]#
Bases:
AbstractNodeNode representing the input to the system.
- class spark.graph_editor.models.nodes.SinkNode[source]#
Bases:
AbstractNodeNode representing the output of the system.
- class spark.graph_editor.models.nodes.SparkModuleNode[source]#
Bases:
AbstractNode,abc.ABCAbstract node representing a SparkModule.
- module_cls: type[spark.core.module.SparkModule][source]#
- node_config: spark.core.config.BaseSparkConfig[source]#