-
Notifications
You must be signed in to change notification settings - Fork 245
Model #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Model #769
Changes from all commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
c6acae3
Add Data Models in Feathr
hyingyang-linkedin 45a05ac
Update models.py
hyingyang-linkedin 0696648
Update models.py
hyingyang-linkedin 5cc163d
Update models.py
hyingyang-linkedin 53dfb5e
Update models.py
hyingyang-linkedin 9d9af5f
Update models.py
hyingyang-linkedin 0133fff
Merge branch 'model' of https://github.com/hyingyang-linkedin/feathr …
hyingyang-linkedin 50ddce9
Update models
hyingyang-linkedin 2cd0b9d
Merge branch 'model' of https://github.com/hyingyang-linkedin/feathr …
hyingyang-linkedin d07c922
Update comment based on PR review comments
hyingyang-linkedin dbe39db
Merge branch 'model' of https://github.com/hyingyang-linkedin/feathr …
hyingyang-linkedin 79de04d
To make Source of DerivedFeature to be one object, addine MultiFeaure…
hyingyang-linkedin 9e7e45b
Merge branch 'model' of https://github.com/hyingyang-linkedin/feathr …
hyingyang-linkedin 5358bd9
Add attributes to data models
hyingyang-linkedin 4b05e53
Added _scproxy necessary for MacOS (#651)
ahlag 6d930ea
Add docs for consuming features in online environment (#609)
xiaoyongzhu fe478ab
Clean up after moving to LFAI (#665)
xiaoyongzhu cdbe3aa
Updating docker version in ARM template to use latest release tagged …
jainr 1544999
Added prettier documentation (#672)
ahlag 8497219
UI: Add data source detail page (#620)
ahlag e6c69da
Add aerospike sink (#632)
YihuiGuo 739407d
Remove reference to aerospike in sbt (#680)
YihuiGuo f3a7206
Extend RBAC to support project id as input (#673)
Yuqing-cat 7ccfd79
Local Spark Provider which supports to submit feature join job in loc…
Yuqing-cat dacda66
Fixing issue with docker image on demo apps not getting updated (#686)
jainr 42c81a3
Lock python dependency versions (#690)
xiaoyongzhu d215f14
Apply 'aggregation_features' parameter to merge dataframes (#667)
enya-yx 8830247
Fix data source detail page in rbac registry (#698)
Yuqing-cat 9be7a59
Fix multi-keyed feature in anchor (direct purview) (#676)
YihuiGuo 5fb8025
Fix path with #LATEST (#684)
jaymo001 a58e017
Fix Feature value adaptor and UDF adaptor on Spark executors (#660)
jaymo001 6a3e74a
Enhance SQL Registry Error Messages (#674)
windoze 89835c3
bump version to 0.8.0 (#694)
Yuqing-cat 930640f
Fix feature type bug where inferred feature type might not be honored…
jaymo001 41bc451
Update setup.py (#702)
xiaoyongzhu e300c55
fix rbac+purview web app issue (#700)
Yuqing-cat 8d44482
Remove hard coded resources in docs (#696)
enya-yx 5cccd84
Add e2e test for purview registry and rbac registry (#689)
blrchen cf3d1f5
Update test use runtime jar from maven for spark submission to cover …
blrchen d73a6ae
Enhance databricks submission error message (#710)
enya-yx 943058c
Enhance purview registry error messages (#709)
blrchen 8e63036
hot fix databricks es dependency issue (#713)
Yuqing-cat 9603793
Fix materialize to sql e2e test failure (#717)
blrchen dca177c
Add Data Models in Feathr (#659)
hyingyang-linkedin ac6403f
Revert "Enhance purview registry error messages (#709)" (#720)
blrchen 588484b
Improve Avro GenericRecord and SpecificRecord based row-level extract…
jaymo001 4a389cb
Save lookup feature definition to HOCON files (#732)
jaymo001 6a49796
Fix function string parsing (#725)
loomlike c3b0eb8
Apply a same credential within each sample (#718)
enya-yx 15a02a9
Enable incremental for HDFS sink (#695)
enya-yx ce32b17
#492 fix, fail only if different sources have same name (#733)
windoze ecdf585
Remove unused credentials and deprecated purview settings (#708)
enya-yx 54dfa85
Revoke token submitted by mistaken (#730)
blrchen 529da26
Update product_recommendation_demo.ipynb
hangfei 9d5b98d
Fix synapse errors not print out issue (#734)
enya-yx 08a3090
Spark config passing bug fix for local spark submission (#729)
loomlike 1c5a31e
Fix direct purview client missing transformation (#736)
YihuiGuo aa2f4cf
Revert "Derived feature bugfix (#121)" (#731)
jaymo001 a136cf8
Support SWA with groupBy to 1d tensor conversion (#748)
jaymo001 df64835
Rijai/armfix (#742)
jainr 30a7b86
bump version to 0.8.2 (#722)
Yuqing-cat 0c9bba0
Added latest deltalake version (#735)
ahlag 77f93f7
#474 Disable local mode (#738)
windoze 0760299
Allow recreating entities for PurView registry (#691)
windoze 0acb0f3
Adding DevSkim linter to Github actions (#657)
jainr b118159
Fix icons in UI cannot auto scale (#737) (#744)
Fendoe beb4588
Expose 'timePartitionPattern' in Python API [ WIP ] (#714)
enya-yx e93f9ca
Setting up component governance pipeline (#655)
jainr 24e0b8b
Add docs to explain on feature materialization behavior (#688)
xiaoyongzhu 38fd0cd
Fix protobuf version (#711)
enya-yx da52af6
Add some notes based on on-call issues (#753)
enya-yx 6cb3447
Refine spark runtime error message (#755)
Yuqing-cat 3ef64cf
Serialization bug due to version incompatibility between azure-core a…
jainr d6c1958
Unify Python SDK Build Version and decouple Feathr Maven Version (#746)
Yuqing-cat ef973e5
replace hard code string in notebook and align with others (#765)
Yuqing-cat d711452
Add flag to enable generation non-agg features (#719)
windoze a041253
rollback 0.8.2 version bump PR (#771)
Yuqing-cat 53af098
Refactor Product Recommendation sample notebook (#743)
jainr b24a7cd
Update role-management page in UI (#751) (#764)
Fendoe fb0fe85
Create Feature less module in UI code and import alias (#768)
Fendoe 0d7fac7
Add dev and notebook dependencies. Add extra dependency installation …
loomlike 88d495f
Fix Windows compatibility issues (#776)
xiaoyongzhu 8ca3063
Update models.py
hyingyang-linkedin 5007481
Update models.py
hyingyang-linkedin 0cd2983
Merge remote-tracking branch 'upstream/main' into model
hyingyang-linkedin e45b800
Address comments
hyingyang-linkedin a4c8ff6
Remove sourceRef
hyingyang-linkedin b94b15e
Add functionType
hyingyang-linkedin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| from pydantic import BaseModel | ||
| from typing import Dict, Optional, List, Union | ||
| import json | ||
| from enum import Enum | ||
|
|
||
|
|
||
| class ValueType(Enum): | ||
| """ | ||
| Type of the feature. | ||
| """ | ||
| INT = "int" | ||
| LONG = "long" | ||
| FLOAT = "float" | ||
| DOUBLE = "double" | ||
| STRING = "string" | ||
| BOOLEAN = "boolean" | ||
| BYTES = "bytes" | ||
|
|
||
|
|
||
| class DimensionType(Enum): | ||
| """ | ||
| Supported dimension types for tensors in Feathr. | ||
| """ | ||
| INT = "int" | ||
| LONG = "long" | ||
| STRING = "string" | ||
| BOOLEAN = "boolean" | ||
| BYTES = "bytes" | ||
|
|
||
|
|
||
| class TensorCategory(Enum): | ||
| """ | ||
| Supported Tensor categories in Feathr. | ||
| """ | ||
| DENSE = "dense" # Dense tensors store values in a contiguous sequential block of memory where all values are represented. | ||
| SPARSE = "sparse" # Sparse tensor represents a dataset in which most of the entries are zero. | ||
| RAGGED = "ragged" # Ragged tensors (also known as nested tensors) are similar to dense tensors but have variable-length dimensions. | ||
|
|
||
|
|
||
| class FeatureValueType(Enum): | ||
| """ | ||
| The high level types associated with a feature. | ||
| This represents the high level semantic types supported by early versions of Frame. | ||
| """ | ||
| BOOLEAN = "boolean" # Boolean valued feature | ||
| NUMERIC = "numeric" # Numerically valued feature | ||
| CATEGORICAL = "categorical" # Represent a feature that consists of a single category | ||
| CATEGORICAL_SET = "categorical_set" # Represent a feature that consists of multiple categories | ||
| DENSE_VECTOR = "dense_vector" # Represent a feature in vector format where the majority of the elements are non-zero | ||
| TERM_VECTOR = "term_vector" # Represent features that has string terms and numeric value | ||
| TENSOR = "tensor" # Represent tensor based features. | ||
| UNSPECIFIED = "unspecified" # Placeholder for when no types are specified | ||
|
|
||
|
|
||
| class Dimension(BaseModel): | ||
| """ | ||
| Tensor is used to represent feature data. A tensor is a generalization of vectors and matrices to potentially higher dimensions. | ||
| """ | ||
| type: DimensionType # Type of the dimension in the tensor. Each dimension can have a different type. | ||
| shape: Optional[int] # Size of the dimension in the tensor. If unset, it means the size is unknown and actual size will be determined at runtime. | ||
|
|
||
|
|
||
| class TensorFeatureFormat(BaseModel): | ||
| """ | ||
| Defines the format of feature data. Feature data is produced by applying transformation on source, in a Feature. | ||
| Tensor is used to represent feature data. A tensor is a generalization of vectors and matrices to potentially | ||
| higher dimensions. | ||
| """ | ||
| tensorCategory: TensorCategory # Type of the tensor. | ||
| valueType: ValueType # Type of the value column. | ||
| dimensions: List[Dimension] # A feature data can have zero or more dimensions (columns that represent keys). | ||
|
|
||
|
|
||
| class FeatureType(BaseModel): | ||
| """ | ||
| Information about a featureName. It defines the type, format and default value. | ||
| Tensor is the next generation representation of the features, so using | ||
| Tensor type w TensorFeatureFormat would be preferable FeatureType. | ||
| """ | ||
| type: FeatureValueType # Defines the high level semantic type of feature. | ||
| format: Optional[TensorFeatureFormat] # Defines the format of feature data. | ||
| defaultValue: Union[bool, int, float, str, bytes] | ||
|
|
||
|
|
||
| class Clazz(BaseModel): | ||
| """ | ||
| Reference to a class by fully-qualified name | ||
| """ | ||
| fullyQualifiedName: str # A fully-qualified class name including paths. | ||
|
|
||
|
|
||
| class Function(BaseModel): | ||
| """ | ||
| Base model for all functions | ||
| """ | ||
| expression: str # Expression in str format | ||
| functionType: str # Type of function in str format, will be used in UI | ||
|
|
||
|
|
||
| class MvelExpression(Function): | ||
| """ | ||
| An expression in MVEL language. | ||
| """ | ||
| mvel: str # The MVEL expression | ||
|
|
||
|
|
||
| class UserDefinedFunction(Function): | ||
|
LeBenHL marked this conversation as resolved.
|
||
| """ | ||
| User defined function that can be used in feature extraction or derivation. | ||
| """ | ||
| clazz: Clazz # Reference to the class that implements the user defined function. | ||
| parameters: Dict[str, json] = {} # This field defines the custom parameters of the user defined function | ||
|
|
||
|
|
||
| class SparkSqlExpression(Function): | ||
| """ | ||
| An expression in Spark SQL. | ||
| """ | ||
| sql: str # Spark SQl expression | ||
|
hyingyang-linkedin marked this conversation as resolved.
|
||
|
|
||
|
|
||
| class SemanticVersion(BaseModel): | ||
| """ | ||
| A representation of a semantic version (see https://semver.org/) | ||
| """ | ||
| majorVersion: int # The major version of this version. This is the x in x.y.z. | ||
| minorVersion: int # The minor version of this version. This is the y in x.y.z | ||
| patchVersion: int # The patch version of this version. This is the z in x.y.z | ||
| metadata: Optional[str] # Optional build metadata attached to this version. | ||
|
|
||
|
|
||
| class FeathrModel(BaseModel): | ||
| """ | ||
| Base model for feathr entity which will be displayed in Feathr UI | ||
| """ | ||
| displayName: str # name of the entity showed on UI | ||
| typeName: str # type of entity in str format, will be displayed in UI | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.