tencent-wedata-feature-engineering-dev 0.1.44__py3-none-any.whl → 0.1.46__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tencent-wedata-feature-engineering-dev might be problematic. Click here for more details.
- {tencent_wedata_feature_engineering_dev-0.1.44.dist-info → tencent_wedata_feature_engineering_dev-0.1.46.dist-info}/METADATA +1 -1
- {tencent_wedata_feature_engineering_dev-0.1.44.dist-info → tencent_wedata_feature_engineering_dev-0.1.46.dist-info}/RECORD +8 -8
- wedata/feature_store/constants/constants.py +1 -1
- wedata/feature_store/feast_client/feast_client.py +0 -2
- wedata/feature_store/feature_table_client/feature_table_client.py +19 -8
- wedata/feature_store/training_set_client/training_set_client.py +4 -0
- {tencent_wedata_feature_engineering_dev-0.1.44.dist-info → tencent_wedata_feature_engineering_dev-0.1.46.dist-info}/WHEEL +0 -0
- {tencent_wedata_feature_engineering_dev-0.1.44.dist-info → tencent_wedata_feature_engineering_dev-0.1.46.dist-info}/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ wedata/feature_store/common/protos/feature_store_pb2.py,sha256=oMIUGGeGNP84g_nFq
|
|
|
12
12
|
wedata/feature_store/common/store_config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
wedata/feature_store/common/store_config/redis.py,sha256=9R5npM2s1u0o9IakmpbRsFdJC0vNar_uvA62OLWuXBs,1145
|
|
14
14
|
wedata/feature_store/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
wedata/feature_store/constants/constants.py,sha256=
|
|
15
|
+
wedata/feature_store/constants/constants.py,sha256=KxDS2NKE_Y3pEm4WmZuROiX7OUHvz6xFKwVKTePQW9Q,1959
|
|
16
16
|
wedata/feature_store/constants/engine_types.py,sha256=42mI-kNDDtoA4_I3iqDe4FkF2M2l_Bt4Q1V6WUB-_k0,921
|
|
17
17
|
wedata/feature_store/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
wedata/feature_store/entities/column_info.py,sha256=-AR6EKHwgoqIkRHFyguxVEtnYt6fvusWHkEjF4kvS0A,5141
|
|
@@ -30,13 +30,13 @@ wedata/feature_store/entities/on_demand_column_info.py,sha256=a44ep-f3FOruWNXl3c
|
|
|
30
30
|
wedata/feature_store/entities/source_data_column_info.py,sha256=FyBmBPUSvc2S2OPFTvsQf2AdS-KFGkYBmd4yL_Vur8M,702
|
|
31
31
|
wedata/feature_store/entities/training_set.py,sha256=ylt1h6Z_xU8hKYvnvd80CeewTGSN68-_kvFpoliwH7s,5679
|
|
32
32
|
wedata/feature_store/feast_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
wedata/feature_store/feast_client/feast_client.py,sha256=
|
|
33
|
+
wedata/feature_store/feast_client/feast_client.py,sha256=mCv-OiKehfgcOJhJV0wXMRs5d7e2zEBYmVmDguk0rxU,20728
|
|
34
34
|
wedata/feature_store/feature_table_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
wedata/feature_store/feature_table_client/feature_table_client.py,sha256=
|
|
35
|
+
wedata/feature_store/feature_table_client/feature_table_client.py,sha256=qKkzQVIa9_rPpkTaLWh6VQ2DPBlyb7UzM-JFTsAHbZ8,42559
|
|
36
36
|
wedata/feature_store/spark_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
wedata/feature_store/spark_client/spark_client.py,sha256=aTenEqfZoJYMrph98qjNHZ-H4dgNKnMaH14st8bCVRQ,11797
|
|
38
38
|
wedata/feature_store/training_set_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
wedata/feature_store/training_set_client/training_set_client.py,sha256=
|
|
39
|
+
wedata/feature_store/training_set_client/training_set_client.py,sha256=wwxTMGPm9QZXjGFv9XI2hA5N1pHntxhAJ6Grcfg6C2g,23572
|
|
40
40
|
wedata/feature_store/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
wedata/feature_store/utils/common_utils.py,sha256=vkpoXxZTd6S-2MgdyTQZ6P_ckdqNSK50ECuVBG2BwfI,12314
|
|
42
42
|
wedata/feature_store/utils/env_utils.py,sha256=kMCl6gyqDxjN5IZ7-wZMR0R4YY-Evh_7NHxugSYPWQc,2736
|
|
@@ -58,7 +58,7 @@ wedata/tempo/ml.py,sha256=WtGa2szn6PditvZsTZoxo7wFDe4k1SRoMZ-jgNGIjvE,4323
|
|
|
58
58
|
wedata/tempo/resample.py,sha256=h81RVVmCl4ect-YKE-KZZHPDi1rGI3sh-YIb-Btz0ck,9698
|
|
59
59
|
wedata/tempo/tsdf.py,sha256=S4lZfxhSRFiezYoYS6gvGsl1mZA3zp-MWEKFHYZpDg0,70968
|
|
60
60
|
wedata/tempo/utils.py,sha256=I9I6l2DMwUoY213L04Yc1UR_zTWgSkj1BVo4ZwzQd4Y,7977
|
|
61
|
-
tencent_wedata_feature_engineering_dev-0.1.
|
|
62
|
-
tencent_wedata_feature_engineering_dev-0.1.
|
|
63
|
-
tencent_wedata_feature_engineering_dev-0.1.
|
|
64
|
-
tencent_wedata_feature_engineering_dev-0.1.
|
|
61
|
+
tencent_wedata_feature_engineering_dev-0.1.46.dist-info/METADATA,sha256=s5EcvoA3Dz40G15pMbjaFZ_gvPEulSYjDzPiB6bRYlg,582
|
|
62
|
+
tencent_wedata_feature_engineering_dev-0.1.46.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
63
|
+
tencent_wedata_feature_engineering_dev-0.1.46.dist-info/top_level.txt,sha256=Xa0v1rh__RvfVTVDirW5r5UBKg7ZO_iuTeXfp8MNo2A,7
|
|
64
|
+
tencent_wedata_feature_engineering_dev-0.1.46.dist-info/RECORD,,
|
|
@@ -43,7 +43,7 @@ ML_MODEL = "MLmodel"
|
|
|
43
43
|
FEATURE_LOOKUP_CLIENT_PIP_PACKAGE = "tencent-wedata-feature-engineering-dev"
|
|
44
44
|
|
|
45
45
|
# 特征查找版本号
|
|
46
|
-
FEATURE_LOOKUP_CLIENT_MAJOR_VERSION = "0.1.
|
|
46
|
+
FEATURE_LOOKUP_CLIENT_MAJOR_VERSION = "0.1.46"
|
|
47
47
|
|
|
48
48
|
# 特征存储内部数据目录
|
|
49
49
|
FEATURE_STORE_INTERNAL_DATA_DIR = "_wedata_internal/"
|
|
@@ -147,8 +147,6 @@ class FeastClient:
|
|
|
147
147
|
self._client.apply(feature_service)
|
|
148
148
|
self._client.registry.delete_feature_view(feast_table_name, self._client.project)
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
150
|
def get_feature_view(self, table_name: str):
|
|
153
151
|
feast_table_name = translate_table_name_to_feast(table_name)
|
|
154
152
|
return self._client.get_feature_view(feast_table_name)
|
|
@@ -123,6 +123,11 @@ class FeatureTableClient:
|
|
|
123
123
|
"""转义SQL值中的特殊字符"""
|
|
124
124
|
return value.replace("'", "''")
|
|
125
125
|
|
|
126
|
+
@staticmethod
|
|
127
|
+
def _check_sequence_element_type(sequence: Sequence[Any], element_type: type) -> bool:
|
|
128
|
+
"""检查序列中的元素是否为指定类型"""
|
|
129
|
+
return all(isinstance(element, element_type) for element in sequence)
|
|
130
|
+
|
|
126
131
|
def create_table(
|
|
127
132
|
self,
|
|
128
133
|
name: str,
|
|
@@ -165,6 +170,10 @@ class FeatureTableClient:
|
|
|
165
170
|
primary_keys = self._normalize_params(primary_keys)
|
|
166
171
|
partition_columns = self._normalize_params(partition_columns)
|
|
167
172
|
|
|
173
|
+
assert self._check_sequence_element_type(primary_keys, str), "primary_keys must be a list of strings"
|
|
174
|
+
assert self._check_sequence_element_type(partition_columns, str), "partition_columns must be a list of strings"
|
|
175
|
+
assert isinstance(timestamp_key, str), "timestamp key must be string"
|
|
176
|
+
|
|
168
177
|
# 元数据校验
|
|
169
178
|
self._validate_schema(df, schema)
|
|
170
179
|
self._validate_key_exists(primary_keys, timestamp_key)
|
|
@@ -444,6 +453,10 @@ class FeatureTableClient:
|
|
|
444
453
|
common_utils.validate_table_name(name)
|
|
445
454
|
common_utils.validate_database(database_name)
|
|
446
455
|
|
|
456
|
+
if primary_keys:
|
|
457
|
+
assert self._check_sequence_element_type(primary_keys, str), "primary_keys must be a list of strings"
|
|
458
|
+
assert isinstance(timestamp_key, str), "timestamp key must be string"
|
|
459
|
+
|
|
447
460
|
# 构建完整表名
|
|
448
461
|
table_name = common_utils.build_full_table_name(name, database_name)
|
|
449
462
|
|
|
@@ -456,11 +469,12 @@ class FeatureTableClient:
|
|
|
456
469
|
|
|
457
470
|
# 检查Primary Key和Timestamp Key是否为空
|
|
458
471
|
if engine_type == engine_type.ICEBERG_ENGINE and props.get("format-version", "") == "2":
|
|
459
|
-
if
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
472
|
+
if not primary_keys:
|
|
473
|
+
if props.get('dlc.ao.data.govern.sorted.keys', "") == "":
|
|
474
|
+
raise ValueError(
|
|
475
|
+
"table dlc.ao.data.govern.sorted.keys is empty. you must set dlc.ao.data.govern.sorted.keys")
|
|
476
|
+
else:
|
|
477
|
+
primary_keys = props.get('dlc.ao.data.govern.sorted.keys').split(",")
|
|
464
478
|
elif engine_type == engine_type.HIVE_ENGINE:
|
|
465
479
|
if not primary_keys:
|
|
466
480
|
raise ValueError("primary_keys cannot be None for HIVE_ENGINE")
|
|
@@ -613,9 +627,6 @@ class FeatureTableClient:
|
|
|
613
627
|
print(f"Table '{name}' does not exist")
|
|
614
628
|
return
|
|
615
629
|
|
|
616
|
-
# 检查
|
|
617
|
-
df = self._spark.table(tableName=table_name)
|
|
618
|
-
|
|
619
630
|
try:
|
|
620
631
|
feature_view = self._feast_client.get_feature_view(table_name)
|
|
621
632
|
except Exception as e:
|
|
@@ -438,12 +438,16 @@ class TrainingSetClient:
|
|
|
438
438
|
]
|
|
439
439
|
# print(f"wedata source_data_names:{source_data_names}")
|
|
440
440
|
|
|
441
|
+
print("===>source_data_names:", source_data_names)
|
|
442
|
+
|
|
441
443
|
feature_output_names = [
|
|
442
444
|
fci.output_name for fci in feature_spec.feature_column_infos
|
|
443
445
|
]
|
|
446
|
+
print("====>feature_output_names:", feature_output_names)
|
|
444
447
|
on_demand_output_names = [
|
|
445
448
|
odci.output_name for odci in feature_spec.on_demand_column_infos
|
|
446
449
|
]
|
|
450
|
+
print("====>on_demand_output_names:", on_demand_output_names)
|
|
447
451
|
all_output_names = set(
|
|
448
452
|
source_data_names + feature_output_names + on_demand_output_names
|
|
449
453
|
)
|
|
File without changes
|