snowflake.ml.model.model_signature.BaseFeatureSpec¶
- class snowflake.ml.model.model_signature.BaseFeatureSpec(name: str, shape: Optional[Tuple[int, ...]])¶
Bases:
ABC
Abstract Class for specification of a feature.
Methods
- abstract as_dtype(force_numpy_dtype: bool = False) Union[dtype[Any], None, type[Any], _SupportsDType[dtype[Any]], str, tuple[Any, int], tuple[Any, Union[SupportsIndex, collections.abc.Sequence[SupportsIndex]]], list[Any], _DTypeDict, tuple[Any, Any], Int8Dtype, Int16Dtype, Int32Dtype, Int64Dtype, UInt8Dtype, UInt16Dtype, UInt32Dtype, UInt64Dtype, Float32Dtype, Float64Dtype, BooleanDtype, StringDtype] ¶
Convert to corresponding local Type.
- abstract as_snowpark_type() DataType ¶
Convert to corresponding Snowpark Type.
- abstract classmethod from_dict(input_dict: Dict[str, Any]) BaseFeatureSpec ¶
Deserialization
- abstract to_dict() Dict[str, Any] ¶
Serialization
Attributes
- name¶
Name of the feature.