Node Class
Represents a basic unit in a graph, for example, it could be any datasource or step.
Initialize Node.
- Inheritance
-
builtins.objectNode
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
|
The ID of the node. |
name
|
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
|
The ID of the node. |
name
Required
|
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:
|
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
|
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
|
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
|
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
module_def
name
node_id
output_dict
Get a dictionary containing all outputs.
Returns
Type | Description |
---|---|
Dictionary of {output name, OutputPort} |