tencent-wedata-feature-engineering-dev 0.1.42__tar.gz → 0.1.43__tar.gz

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.

Files changed (69) hide show
  1. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/PKG-INFO +1 -1
  2. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/tencent_wedata_feature_engineering_dev.egg-info/PKG-INFO +1 -1
  3. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/constants/constants.py +1 -1
  4. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/feast_client/feast_client.py +3 -2
  5. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/spark_client/spark_client.py +0 -2
  6. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/env_utils.py +19 -10
  7. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/README.md +0 -0
  8. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/setup.cfg +0 -0
  9. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/setup.py +0 -0
  10. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/tencent_wedata_feature_engineering_dev.egg-info/SOURCES.txt +0 -0
  11. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/tencent_wedata_feature_engineering_dev.egg-info/dependency_links.txt +0 -0
  12. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/tencent_wedata_feature_engineering_dev.egg-info/requires.txt +0 -0
  13. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/tencent_wedata_feature_engineering_dev.egg-info/top_level.txt +0 -0
  14. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/__init__.py +0 -0
  15. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/__init__.py +0 -0
  16. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/client.py +0 -0
  17. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/cloud_sdk_client/__init__.py +0 -0
  18. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/cloud_sdk_client/client.py +0 -0
  19. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/cloud_sdk_client/models.py +0 -0
  20. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/cloud_sdk_client/utils.py +0 -0
  21. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/common/__init__.py +0 -0
  22. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/common/protos/__init__.py +0 -0
  23. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/common/protos/feature_store_pb2.py +0 -0
  24. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/common/store_config/__init__.py +0 -0
  25. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/common/store_config/redis.py +0 -0
  26. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/constants/__init__.py +0 -0
  27. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/constants/engine_types.py +0 -0
  28. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/__init__.py +0 -0
  29. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/column_info.py +0 -0
  30. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/environment_variables.py +0 -0
  31. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature.py +0 -0
  32. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_column_info.py +0 -0
  33. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_function.py +0 -0
  34. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_lookup.py +0 -0
  35. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_spec.py +0 -0
  36. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_spec_constants.py +0 -0
  37. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_table.py +0 -0
  38. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/feature_table_info.py +0 -0
  39. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/function_info.py +0 -0
  40. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/on_demand_column_info.py +0 -0
  41. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/source_data_column_info.py +0 -0
  42. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/entities/training_set.py +0 -0
  43. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/feast_client/__init__.py +0 -0
  44. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/feature_table_client/__init__.py +0 -0
  45. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/feature_table_client/feature_table_client.py +0 -0
  46. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/mlflow_model.py +0 -0
  47. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/spark_client/__init__.py +0 -0
  48. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/training_set_client/__init__.py +0 -0
  49. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/training_set_client/training_set_client.py +0 -0
  50. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/__init__.py +0 -0
  51. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/common_utils.py +0 -0
  52. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/feature_lookup_utils.py +0 -0
  53. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/feature_spec_utils.py +0 -0
  54. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/feature_utils.py +0 -0
  55. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/on_demand_utils.py +0 -0
  56. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/schema_utils.py +0 -0
  57. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/signature_utils.py +0 -0
  58. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/topological_sort.py +0 -0
  59. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/training_set_utils.py +0 -0
  60. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/uc_utils.py +0 -0
  61. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/feature_store/utils/validation_utils.py +0 -0
  62. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/__init__.py +0 -0
  63. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/interpol.py +0 -0
  64. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/intervals.py +0 -0
  65. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/io.py +0 -0
  66. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/ml.py +0 -0
  67. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/resample.py +0 -0
  68. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/tsdf.py +0 -0
  69. {tencent-wedata-feature-engineering-dev-0.1.42 → tencent-wedata-feature-engineering-dev-0.1.43}/wedata/tempo/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencent-wedata-feature-engineering-dev
3
- Version: 0.1.42
3
+ Version: 0.1.43
4
4
  Summary: Wedata Feature Engineering Library Development
5
5
  Home-page:
6
6
  Author: meahqian
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencent-wedata-feature-engineering-dev
3
- Version: 0.1.42
3
+ Version: 0.1.43
4
4
  Summary: Wedata Feature Engineering Library Development
5
5
  Home-page:
6
6
  Author: meahqian
@@ -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.42"
46
+ FEATURE_LOOKUP_CLIENT_MAJOR_VERSION = "0.1.43"
47
47
 
48
48
  # 特征存储内部数据目录
49
49
  FEATURE_STORE_INTERNAL_DATA_DIR = "_wedata_internal/"
@@ -20,6 +20,7 @@ import pytz
20
20
  from feast import FeatureStore, RepoConfig, FeatureView
21
21
  from pyspark.sql import DataFrame, SparkSession
22
22
  from wedata.feature_store.common.store_config.redis import RedisStoreConfig
23
+ from wedata.feature_store.utils import env_utils
23
24
  from feast import Entity, FeatureService
24
25
  from feast.infra.offline_stores.contrib.spark_offline_store.spark_source import SparkSource
25
26
  from feast.infra.online_stores.redis import RedisOnlineStore
@@ -37,8 +38,8 @@ TEMP_FILE_PATH = "/tmp/feast_data/"
37
38
  class FeastClient:
38
39
 
39
40
  def __init__(self, offline_store: SparkSession, online_store_config: RedisStoreConfig = None):
40
- project_id = os.getenv("WEDATA_PROJECT_ID", "")
41
- remote_path = os.getenv("FEAST_REMOTE_ADDRESS", "")
41
+ project_id = env_utils.get_project_id()
42
+ remote_path = env_utils.get_feast_remote_url()
42
43
  if offline_store is None or not isinstance(offline_store, SparkSession):
43
44
  raise ValueError("offline_store must be provided SparkSession instance")
44
45
 
@@ -36,7 +36,6 @@ class SparkClient:
36
36
  catalog = self._spark.sql("SELECT current_catalog()").first()[0]
37
37
  return unsanitize_identifier(catalog)
38
38
 
39
-
40
39
  def get_current_database(self):
41
40
  """
42
41
  获取Spark上下文中当前设置的数据库名称
@@ -56,7 +55,6 @@ class SparkClient:
56
55
  def createDataFrame(self, data, schema) -> DataFrame:
57
56
  return self._spark.createDataFrame(data, schema)
58
57
 
59
-
60
58
  def read_table(self, table_name):
61
59
  """读取Spark表数据
62
60
 
@@ -38,10 +38,10 @@ def get_region() -> str:
38
38
  获取当前地域
39
39
  """
40
40
  region_dlc = os.environ.get("DLC_REGION")
41
- region_emr = os.environ.get("EMR_REGION")
41
+ region_emr = os.environ.get("KERNEL_REGION")
42
42
  region = region_dlc if region_dlc else region_emr
43
43
  if not region:
44
- raise EnvironmentError("environment variable DLC_REGION or EMR_REGION is not set, "
44
+ raise EnvironmentError("environment variable DLC_REGION or KERNEL_REGION is not set, "
45
45
  "please check environment configuration")
46
46
  return region
47
47
 
@@ -72,20 +72,14 @@ def get_engine_name() -> str:
72
72
  """
73
73
  获取引擎名称
74
74
  """
75
- engine_name = os.environ.get("KERNEL_ENGINE_NAME")
76
- if engine_name:
77
- return engine_name
78
- raise EnvironmentError("environment variable KERNEL_ENGINE_NAME is not set, please check environment configuration")
75
+ return _get_variable("KERNEL_ENGINE_NAME")
79
76
 
80
77
 
81
78
  def get_engine_id() -> str:
82
79
  """
83
80
  获取引擎ID
84
81
  """
85
- engine_id = os.environ.get("KERNEL_ENGINE")
86
- if engine_id:
87
- return engine_id
88
- raise EnvironmentError("environment variable KERNEL_ENGINE is not set, please check environment configuration")
82
+ return _get_variable("KERNEL_ENGINE")
89
83
 
90
84
 
91
85
  def get_engine_type() -> str:
@@ -94,3 +88,18 @@ def get_engine_type() -> str:
94
88
  """
95
89
  return "DLC" if os.environ.get("DLC_REGION") else "EMR"
96
90
 
91
+
92
+ def get_feast_remote_url() -> str:
93
+ """
94
+ 获取Feast远程URL
95
+ """
96
+ return _get_variable("KERNEL_FEAST_REMOTE_ADDRESS")
97
+
98
+
99
+ def _get_variable(variable_key: str, is_raise: bool = True, default_value: str = None) -> str:
100
+ val = os.environ.get(variable_key, default_value)
101
+ if not val:
102
+ if is_raise:
103
+ raise EnvironmentError(f"environment variable {variable_key} is not set, "
104
+ f"please check environment configuration")
105
+ return val