pyniryo_nate.models.metrics.get_mtype¶
- pyniryo_nate.models.metrics.get_mtype(_type: type, a: Literal[False]) MType[source]¶
- pyniryo_nate.models.metrics.get_mtype(_type: type, a: Literal[True]) CustomMetricMType
- pyniryo_nate.models.metrics.get_mtype(_type: type, a: bool = False) MType | CustomMetricMType
Get the MType corresponding to a Python type for metrics.
- Parameters:
_type (type) – The Python type.
a (bool) – Whether to return the asynchronous MType variant.
- Returns:
The corresponding MType enum value.
- Raises:
TypeError – If the type is not supported for metrics.
- Return type:
MType | CustomMetricMType