nv_dfm_core.api.NodeId#

class nv_dfm_core.api.NodeId(*, tag='@dfm-node', ident)[source]#

NodeId uniquely identifies a node in a Pipeline graph. The NodeId is used at the node itself. Other nodes use NodeRef, not NodeId, to reference this node. NodeRef is different from the NodeId in that it adds a possible selector to reference individual fields of the node’s result.

Parameters:
  • tag (Literal['@dfm-node'])

  • ident (int | str)

as_identifier()[source]#

Returns this node_id as a valid identifier

Return type:

str

model_config = {'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

to_ref(sel=None, issubs=None)[source]#

Create a NodeRef from a NodeId. If issubs is not provided, it is inferred from whether sel is an int or a str. For ints we assume a subscript like some_val[42] whereas for strings we assume a field selector like some_val.myname

Parameters:
  • sel (int | str | None)

  • issubs (bool | None)