package common
parameter map(config) utility class, help user to get parameter value with a default value, example usage:
import com.linkedin.feathr.common.RichConfig._ val batchValue = _params.map(_.getBooleanWithDefault(batchPath, true)).get
- Alphabetic
- By Inheritance
- common
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
AnchorExtractor[T] extends AnchorExtractorBase[T] with SparkRowExtractor
Provides feature values based on some "raw" data element
Provides feature values based on some "raw" data element
- T
raw data type
-
trait
AnchorExtractorBase[T] extends Serializable
base class for feature extractor class, e.g., AnchorExtractor, SimpleAnchorExtractorSpark and GenericAnchorExtractorSpark
base class for feature extractor class, e.g., AnchorExtractor, SimpleAnchorExtractorSpark and GenericAnchorExtractorSpark
- T
row data type
-
class
AutoTensorizableTypes extends AnyRef
Mappings from Feathr FeatureTypes to their "auto-tensorized" tensor type.
Mappings from Feathr FeatureTypes to their "auto-tensorized" tensor type. In other words, when the feature owner does not specify a tensor type, Feathr will pick one based on the feature's FeatureType.
These mappings define how Feathr will represent features having types NUMERIC, CATEGORICAL, etc., as Quince tensors.
- Annotations
- @Experimental()
-
trait
CanConvertToAvroRDD extends AnyRef
If an AnchorExtractor only works on a Avro record, it should extends this trait, and use convertToAvroRdd to do a one-time batch conversion of DataFrame to RDD of their choice.
If an AnchorExtractor only works on a Avro record, it should extends this trait, and use convertToAvroRdd to do a one-time batch conversion of DataFrame to RDD of their choice. convertToAvroRdd will be called by Feathr engine before calling getKeyFromRow() and getFeaturesFromRow() in AnchorExtractor.
-
class
CoercingTensorData extends TensorData
Coerce types in any TensorData to the one requested by the client.
-
class
ColumnUtils extends AnyRef
Utility function to build internal flat array representation based on the types of the input.
-
case class
DateParam(startDate: Option[String] = None, endDate: Option[String] = None, dateOffset: Option[String] = None, numDays: Option[String] = None) extends Product with Serializable
Date can be specified in two ways: 1.
Date can be specified in two ways: 1. startTime plus endTime, or 2. dateOffset plus numDays in the case of 2, the startTime will be "today_in_pst - dateOffset - numDays + 1", endTime will be "today_in_pst - dateOffset" This case class is used both by feature and observation data.
- startDate
in yyyyMMdd or yyyyMMddHH
- endDate
in yyyyMMdd or yyyyMMddHH
- dateOffset
non-negative integer (either in days or hours, resolution will determine if it is in days or hours). Used to calculate the endTime.
- numDays
positive integer (either in days or hours, resolution will determine if it is in days or hours). Used together with dateOffset to calculate the startTime
-
class
Equal extends AnyRef
Compare whether two tensor data are equal.
Compare whether two tensor data are equal.
Note: order does not matter here, and we assume that there is no duplicate rows in left & right tensor data
Return true if the tensors are equal.
-
class
ErasedEntityTaggedFeature extends Serializable
A
com.linkedin.feathr.common.TaggedFeatureNamewhose String tags have been "erased", i.e.A
com.linkedin.feathr.common.TaggedFeatureNamewhose String tags have been "erased", i.e. replaced with integers. The mapping between the integer identifiers and their original string names is unknown by this class and must be maintained externally. -
class
Experimental extends Annotation with Annotation with ClassfileAnnotation
- Annotations
- @Documented() @Retention()
- class FeathrJacksonScalaModule extends Module with JacksonModule with IteratorModule with EnumerationModule with OptionModule with SeqModule with IterableModule with TupleModule with MapModule with SetModule with UntypedObjectDeserializerModule
-
sealed abstract final
class
FeatureAggregationType extends Enum[FeatureAggregationType]
Feature aggregation types
-
class
FeatureDependencyGraph extends AnyRef
A dependency graph for feature anchors and feature derivations.
A dependency graph for feature anchors and feature derivations.
Purpose 1: Given a list of features' dependencies and which features are anchored, build a graph that can determine which features are reachable and can resolve features' transitive dependencies on demand. Purpose 2: Given a list of features with entity key bindings (a.k.a. key tags), provide fully expanded list of all transitive dependencies including entity key bindings. E.g. if feature2 depends on feature1, and the request was for [ (a1):feature2, (a2):feature2 ], then the expanded dependencies would be: [ (a1):feature2, (a2):feature2, (a1):feature1, (a2):feature1]
- Annotations
- @InternalApi()
-
trait
FeatureDerivationFunction extends FeatureDerivationFunctionBase
Produces a derived feature given some input features
-
abstract
class
FeatureDerivationFunctionBase extends Serializable
this is the common trait for derivation function for Feathr internal use if Feathr user need to implement customized derivation, please use FeatureDerivationFunction or FeatureDerivationFunctionSpark
-
class
FeatureError extends AnyRef
An error associated with a particular feature containing an error msg and the corresponding
FeatureErrorCode -
sealed abstract final
class
FeatureErrorCode extends Enum[FeatureErrorCode]
Error code associated with a feature request
-
trait
FeatureExtractor[SOURCE_DATA] extends AnyRef
A feature extractor that extracts
FeatureValuefrom source data.A feature extractor that extracts
FeatureValuefrom source data. The class must have 0-argument constructor so Feathr engine can instantiate the class with 0-argument constructor. We expect this to replaceExtractoreventually.WARNING: This interface is in beta testing and is not approved for public use yet.
- Annotations
- @Experimental()
-
class
FeatureInfo extends AnyRef
information about a feature in the feathr feature join and feature generation output dataframe
-
class
FeatureRef extends Serializable
Represents a fully-qualified reference to a feature.
-
class
FeatureTypeConfig extends Serializable
This class encapsulates the type definition for a feature.
This class encapsulates the type definition for a feature. This implementation supports Feathr's high level semantic type system (e.g. NUMERIC, BOOLEAN, VECTOR) and the new Tensor type system which includes additional metadata such as category, dimensions, shape, value type and etc.
When the feature type annotation from the feature definition is processed, the following scenarios are expected: 1. No type annotated --> (FeatureType=UNSPECIFIED, TensorType=null) 2. High level semantic NON-TENSOR feature types --> (FeatureType=<some value>, TensorType=<mapped from feature type via auto-TZ>) 3. Parameterized Tensor type annotated --> (FeatureTypes = TENSOR, TensorType = <some value>)
- Annotations
- @JsonDeserialize()
-
class
FeatureTypeConfigDeserializer extends JsonDeserializer[FeatureTypeConfig]
Config deserializer for FeatureType config.
Config deserializer for FeatureType config. It mainly supports parsing two type configs: 1. Simple type config: type with a enum. Example: type: BOOLEAN 2. Type config with more specifications. For example: DENSE_VECTOR with size: type: { type: DENSE_VECTOR shape: [10] doc: "documentation" } TENSOR type with more details: type: { type: DENSE_TENSOR shape: [10, 10] dimensionType: [INT, INT] valType: FLOAT doc: "documentation" }
-
sealed abstract final
class
FeatureTypes extends Enum[FeatureTypes]
An Enum that defines the supported feature types in feathr.
An Enum that defines the supported feature types in feathr. This list will be extended in the future.
-
class
FeatureValue extends Serializable with KryoSerializable
Describes the basic representation of a feature value in Feathr.
Describes the basic representation of a feature value in Feathr. This is the OLD FeatureValue API. Feathr is migrating to a new FeatureValue API defined at com.linkedin.feathr.common.value.FeatureValue. This implementation of the old API is a wrapper around the new API, with lots of glue to maintain compatibility.
SERIALIZATION: For use with Spark RDD API, this class is serializable both by Java Object Serialization and by Kryo. Note that because the serialized representation is based on NTV (name-term-value), serialization will NOT work for tensor features having rank greater than 1.
MUTABILITY: For legacy compatibility, instances of this class are mutable under the following conditions:
- When constructed with zero-argument constructor 2. When constructed with Map<String,Float> constructor 3. When constructed specifically as a term-vector using any createStringTermVector factory methods 4. When deserialized with Kryo or Java-Object Serialization When mutable, instances may be mutated by:
- Using modifier methods the Map objects returned by .getValue or .getAsTermVector 2. Using modifier methods on ._value public member field. 3. Using the .put method. All mutability support in FeatureValue is DEPRECATED.
NOTE: This class will be deprecated soon in favor of
com.linkedin.feathr.common.value.FeatureValue -
class
FeatureVariableResolver extends SimpleValueResolver
FeatureVariableResolver takes a FeatureValue object for member variable during MVEL expression evaluation, and then resolve the value for that variable.
-
class
GenericTypedTensor extends TypedTensor
This is the base tensor class, may be created from the basic properties, from a feature or operator applied to another tensor
-
class
Hasher extends AnyRef
Generate hash for a tensor based on column types and values stored in the tensor.
Generate hash for a tensor based on column types and values stored in the tensor. This hash should be same for all tensor instances with same column types and values even if they are implemented differently under the hood.
-
class
Header extends AnyRef
header of the result of the Feathr feature join and feature generation API
-
class
InternalApi extends Annotation with Annotation with ClassfileAnnotation
- Annotations
- @Documented() @Retention()
-
case class
JoiningFeatureParams(keyTags: Seq[String], featureName: String, dateParam: Option[DateParam] = None, timeDelay: Option[String] = None, featureAlias: Option[String] = None) extends Product with Serializable
All parameters relevant to a feature which is requested to be joined in the join config.
All parameters relevant to a feature which is requested to be joined in the join config.
- keyTags
sequence of keyTags of the feature.
- featureName
name of the feature.
- dateParam
time parameters to restrict the size of the joining feature's data. User can set a date range on the feature data.
- timeDelay
the override time delay parameter, which would override the global simulate time delay. This simulates a delay on observation data's timestamp by subtracting this value from observation data's timestamp while joining this specific feature.
- featureAlias
feature alias name, this would be the output of the feature.
-
trait
ParameterizedFeatureExtractor[SOURCE_DATA, PARAM] extends FeatureExtractor[SOURCE_DATA]
This extension of the FeatureExtractor rely on extra parameters to extract features.
This extension of the FeatureExtractor rely on extra parameters to extract features. The expectation is that the Feathr engine will call
initwhen constructing an instance of this Extractor and implementation of this interface is responsible for maintaining any state for the parameters as needed. -
trait
Params extends Serializable
parameter map used in various of classes, such as anchor extractor, derived feature, source key extractor, etc.
parameter map used in various of classes, such as anchor extractor, derived feature, source key extractor, etc.
This helps user to pass arbitrary parameter into the related classes when needed.
- implicit class RichConfig extends AnyRef
-
trait
SparkRowExtractor extends AnyRef
An extractor trait that provides APIs to transform a Spark GenericRowWithSchema into feature values
-
class
TaggedFeatureName extends Serializable
A tuple of (key tag, feature name)
A tuple of (key tag, feature name)
Essentially this is a feature name annotated with info on how we plan to query it.
- class TaggedFeatureUtils extends AnyRef
-
final
class
TensorUtils extends AnyRef
INTERNAL debugging utility functions.
INTERNAL debugging utility functions.
In the future, this class may be deprecated.
- Annotations
- @InternalApi()
-
trait
TypedTensor extends AnyRef
TypedTensor builds on top of @link{TensorType} and @{TensorData} and can be generated from tensor operators that change the shape.
Value Members
- val SELECTED_FEATURES: String
-
object
FeathrAggregationConstants
suffixes used in feature column name by user customized time aware aggregators
- object FeathrJacksonScalaModule extends FeathrJacksonScalaModule