Package com.linkedin.feathr.common
Class PegasusFeatureTypeResolver
java.lang.Object
com.linkedin.feathr.common.PegasusFeatureTypeResolver
This class maps from the pegasus models for feature types to Frame's common domain models for feature types and vice
versa.
This creates a layer of indirection from the feature definition models expressed in Pegasus to the domain models used
by the frame's runtime engine (e.g. frame-online and frame-offline)
-
Method Summary
Modifier and TypeMethodDescriptionstatic PegasusFeatureTypeResolverresolveEmbeddingSize(com.linkedin.feathr.compute.FeatureVersion featureVersion) Deprecated.resolveFeatureType(com.linkedin.feathr.compute.FeatureVersion featureVersion) Resolves theFeatureTypeConfigfrom the the pegasusFeatureVersionmodel.
-
Method Details
-
getInstance
-
resolveFeatureType
public FeatureTypeConfig resolveFeatureType(com.linkedin.feathr.compute.FeatureVersion featureVersion) Resolves theFeatureTypeConfigfrom the the pegasusFeatureVersionmodel. It's based on the following mapping rules: - if `type` is TENSOR without `format` field, it is a FML tensor type - if `type` is TENSOR with `format`, it is a Tensor feature type with FeatureTypeConfig in the feature definition - if `type` is non-TENSOR without `format`, it is a legacy type - if `type` is non-TENSOR with `format`, it is a legacy type with the format storing other info like embedding size that can be resolved using resolveEmbeddingSize(FeatureVersion) -
resolveEmbeddingSize
@Deprecated public Optional<Integer> resolveEmbeddingSize(com.linkedin.feathr.compute.FeatureVersion featureVersion) Deprecated.Resolves the possible SWA embedding size from the pegasusFeatureVersionmodel. The embedding size is valid only when the feature is a possible embedding feature (1-d vector), which means the feature type can only be DENSE_VECTOR, or TENSOR, or UNSPECIFIED. Meanwhile, the input FeatureVersion should have valid format information: 1) the format filed exists and is not null, 2) the shape size is 1. The API is scheduled to be deprecated after dropping legacy feature type support in Frame, after which the embedding size information will always be inside theFeatureTypeConfigbuilt fromresolveFeatureType(com.linkedin.feathr.compute.FeatureVersion). Warning: this should be only used when you know the feature is an embedding feature.
-