Model.convert_position()#
- Model.convert_position(position, *, allow_unknown=False)[source]#
Converts the values in a position using their model-specific converters.
Variable keys use the converter configured on the respective
Var; node keys use the converter configured on the respectiveNode. Unknown keys raise aKeyErrorunlessallow_unknown=True, in which case their values are left unchanged.This method is useful for constructing a typed
Positionat an API boundary, before repeatedly passing it through model computations.