Node Class

Represents a basic unit in a graph, for example, it could be any datasource or step.

Initialize Node.

Inheritance
builtins.object
Node

Constructor

Node(graph, node_id, name=None, module=None, module_builder=None, datasource=None, datasource_builder=None, module_wiring=None)

Parameters

graph
Graph
Required

The graph this node belongs to.

node_id
str
Required

The ID of the node.

name
str
default value: None

The name of the graph.

module
Module
default value: None

The module associated with the Node.

module_builder
<xref:azureml.pipeline.core._ModuleBuilder>
default value: None

The module builder associated with the Node.

datasource
DataSource
default value: None

The datasource associated with the Node.

datasource_builder
<xref:azureml.pipeline.core._DatasourceBuilder>
default value: None

The datasource builder associated with the Node.

module_wiring
Dict[str, object]
default value: None

A mapping between the node's inputs/outputs and the module inputs/outputs. Holds two keys, inputs and outputs, each mapped to a dict whose keys are the module's inputs/outputs names, and the values are the node's ports.

graph
Graph
Required

The graph this node belongs to.

node_id
str
Required

The ID of the node.

name
str
Required

The name of the node.

module
Module
Required

The module associated with the Node.

module_builder
<xref:azureml.pipeline.core._ModuleBuilder>
Required

The module builder associated with the Node.

datasource
DataSource
Required

The datasource associated with the Node.

datasource_builder
<xref:azureml.pipeline.core._DatasourceBuilder>
Required

The datasource builder associated with the Node.

module_wiring
Dict[str, object]
Required

A mapping between the node's inputs/outputs and the module inputs/outputs. Holds two keys, inputs and outputs, each mapped to a dict whose keys are the module's inputs/outputs names, and the values are the node's ports.

Methods

get_input

Return an InputPort by name.

get_output

Return an OutputPort by name.

get_param

Return a parameter by name.

run_after

Run this node after the given node.

If you want to run a step, for example, step3 after both step1 and step2 are completed, you can use:


   step3.run_after(step1)
   step3.run_after(step2)
sequence

Configure a list of nodes to run in sequence after this node.

get_input

Return an InputPort by name.

get_input(name)

Parameters

name
str
Required

Name of the input port.

Returns

The input port with the matching name.

Return type

get_output

Return an OutputPort by name.

get_output(name)

Parameters

name
str
Required

Name of the output port

Returns

The output port

Return type

get_param

Return a parameter by name.

get_param(name)

Parameters

name
str
Required

Name of the parameter.

Returns

The parameter.

Return type

run_after

Run this node after the given node.

If you want to run a step, for example, step3 after both step1 and step2 are completed, you can use:


   step3.run_after(step1)
   step3.run_after(step2)
run_after(node)

Parameters

node
Node
Required

The node to run before this node.

sequence

Configure a list of nodes to run in sequence after this node.

sequence(nodes)

Parameters

nodes
list
Required

The list of nodes.

Attributes

datasource_def

Get the datasource definition.

Returns

The datasource definition object.

Return type

input_dict

Get a dictionary containing all inputs.

Returns

Dictionary of {input name, InputPort}

Return type

inputs

Get a list containing all inputs.

Returns

List of InputPort.

Return type

module_def

Get the module definition.

Returns

The module definition object.

Return type

name

Get the name of this node.

Returns

The name.

Return type

str

node_id

Get the node ID for this node.

Returns

The node ID.

Return type

str

output_dict

Get a dictionary containing all outputs.

Returns

Dictionary of {output name, OutputPort}

Return type

outputs

Get a list containing all outputs.

Returns

List of OutputPort.

Return type

params

Get a dictionary containing all parameters.

Returns

Dictionary of {parameter name, Param}

Return type