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

Name Description
graph
Required

The graph this node belongs to.

node_id
Required
str

The ID of the node.

name
str

The name of the graph.

default value: None
module

The module associated with the Node.

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

The module builder associated with the Node.

default value: None
datasource

The datasource associated with the Node.

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

The datasource builder associated with the Node.

default value: None
module_wiring

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.

default value: None
graph
Required

The graph this node belongs to.

node_id
Required
str

The ID of the node.

name
Required
str

The name of the node.

module
Required

The module associated with the Node.

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

The module builder associated with the Node.

datasource
Required

The datasource associated with the Node.

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

The datasource builder associated with the Node.

module_wiring
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 Description
name
Required
str

Name of the input port.

Returns

Type Description

The input port with the matching name.

get_output

Return an OutputPort by name.

get_output(name)

Parameters

Name Description
name
Required
str

Name of the output port

Returns

Type Description

The output port

get_param

Return a parameter by name.

get_param(name)

Parameters

Name Description
name
Required
str

Name of the parameter.

Returns

Type Description

The parameter.

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

Name Description
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

Name Description
nodes
Required

The list of nodes.

Attributes

datasource_def

Get the datasource definition.

Returns

Type Description

The datasource definition object.

input_dict

Get a dictionary containing all inputs.

Returns

Type Description

Dictionary of {input name, InputPort}

inputs

Get a list containing all inputs.

Returns

Type Description

List of InputPort.

module_def

Get the module definition.

Returns

Type Description

The module definition object.

name

Get the name of this node.

Returns

Type Description
str

The name.

node_id

Get the node ID for this node.

Returns

Type Description
str

The node ID.

output_dict

Get a dictionary containing all outputs.

Returns

Type Description

Dictionary of {output name, OutputPort}

outputs

Get a list containing all outputs.

Returns

Type Description

List of OutputPort.

params

Get a dictionary containing all parameters.

Returns

Type Description

Dictionary of {parameter name, Param}