MCPcopy Create free account
hub / github.com/NVIDIA/DALI / get

Method get

dali/python/nvidia/dali/_conditionals.py:165–174  ·  view source on GitHub ↗

Return the `data_node` if it was produced in this scope, or the appropriate split node that was created for accessing the `data_node` in this scope.

(self, data_node)

Source from the content-addressed store, hash-verified

163 return False
164
165 def get(self, data_node):
166 """Return the `data_node` if it was produced in this scope, or the appropriate split node
167 that was created for accessing the `data_node` in this scope.
168 """
169 assert self.has(data_node)
170 if _data_node_repr(data_node) in self.produced:
171 return data_node
172 else:
173 assert self.branch in {_Branch.TrueBranch, _Branch.FalseBranch}
174 return self.splits[_data_node_repr(data_node)][self.branch.value]
175
176
177class _ConditionStack:

Callers 2

_realize_splitMethod · 0.45
preprocess_inputMethod · 0.45

Calls 2

hasMethod · 0.95
_data_node_reprFunction · 0.85

Tested by

no test coverage detected