cottax.pytree.consumers.surface¶
Places and node names written as key paths: the V / N builders, the names derived from one (PytreeDerivedNames, registered), and the locators (chosen as a surface’s locator).
- node_of(x: str | Node)[source]¶
A node name: an N path or a NodePath, or a string, a DictKey at the root, as a slot in a mapping is.
- Return type:
- class PytreeLocator[source]¶
Bases:
Locator[VarPath,NodePath]What every pytree locator decides alike: a string where a node is due is a key at the root, as a slot in a mapping names one. What a string means where a place is due is each final’s.
- class Under(root: Var, key: type[GetAttrKey] | type[DictKey])[source]¶
Bases:
PytreeLocatorA place string one key under a root, the key a GetAttrKey or a DictKey.
- key: type[GetAttrKey] | type[DictKey]¶
- class InFull[source]¶
Bases:
PytreeLocatorNo place strings: every place written in full, a V path or a VarPath.