mlflow-tclake-plugin 2.1.7.dev2__tar.gz → 2.1.7.dev5__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.
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/PKG-INFO +1 -1
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin/tclake_store.py +17 -1
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/PKG-INFO +1 -1
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/setup.py +1 -1
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/LICENSE.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/README.md +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin/__init__.py +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/SOURCES.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/dependency_links.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/entry_points.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/requires.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin.egg-info/top_level.txt +0 -0
- {mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/setup.cfg +0 -0
|
@@ -71,6 +71,9 @@ TCLAKE_MLFLOW_MODEL_SIGNATURE_KEY = "tclake.mlflow.model_signature"
|
|
|
71
71
|
TCLAKE_WEDATA_PROJECT_ID_KEY = "wedata.project"
|
|
72
72
|
TCLAKE_MLFLOW_MODEL_ARTIFACT_PATH_KEY = "tclake.mlflow.artifact_path"
|
|
73
73
|
WEDATA_DATASCIENCE_TYPE = "wedata.datascience.type"
|
|
74
|
+
# 这些内置 key 在写入侧被存成无前缀属性(见 _add_tags_to_properties /
|
|
75
|
+
# _add_project_id_to_properties),读回时需要一并还原成 tag,否则调用方拿不到。
|
|
76
|
+
UNPREFIXED_BUILTIN_TAG_KEYS = (WEDATA_DATASCIENCE_TYPE, TCLAKE_WEDATA_PROJECT_ID_KEY)
|
|
74
77
|
|
|
75
78
|
|
|
76
79
|
def _set_kv_to_properties(key, value, properties=None):
|
|
@@ -216,9 +219,19 @@ def _get_tags_from_properties(properties):
|
|
|
216
219
|
if properties is None:
|
|
217
220
|
return None
|
|
218
221
|
tags = []
|
|
222
|
+
seen_keys = set()
|
|
223
|
+
# 优先取带前缀的属性:调用方通过 tags 参数显式写入的值
|
|
219
224
|
for p in properties:
|
|
220
225
|
if p["Key"].startswith(TCLAKE_MLFLOW_TAG_PREFIX):
|
|
221
|
-
|
|
226
|
+
tag_key = p["Key"][len(TCLAKE_MLFLOW_TAG_PREFIX):]
|
|
227
|
+
if tag_key not in seen_keys:
|
|
228
|
+
seen_keys.add(tag_key)
|
|
229
|
+
tags.append(ModelVersionTag(tag_key, p["Value"]))
|
|
230
|
+
# 再补无前缀存储的内置 key,已由带前缀属性覆盖的不重复添加
|
|
231
|
+
for p in properties:
|
|
232
|
+
if p["Key"] in UNPREFIXED_BUILTIN_TAG_KEYS and p["Key"] not in seen_keys:
|
|
233
|
+
seen_keys.add(p["Key"])
|
|
234
|
+
tags.append(ModelVersionTag(p["Key"], p["Value"]))
|
|
222
235
|
return tags
|
|
223
236
|
|
|
224
237
|
|
|
@@ -253,6 +266,8 @@ def _get_model_version_name(entity):
|
|
|
253
266
|
def _make_model_version(entity, name):
|
|
254
267
|
properties = entity["Properties"]
|
|
255
268
|
audit = entity["Audit"]
|
|
269
|
+
# 部分接口响应可能不含 Aliases 字段,缺失时按空列表处理
|
|
270
|
+
aliases = entity.get("Aliases") or []
|
|
256
271
|
return ModelVersion(
|
|
257
272
|
name=name,
|
|
258
273
|
version=_get_model_version(entity["Version"]),
|
|
@@ -263,6 +278,7 @@ def _make_model_version(entity, name):
|
|
|
263
278
|
run_id=_get_run_id_from_properties(properties),
|
|
264
279
|
tags=_get_tags_from_properties(properties),
|
|
265
280
|
run_link=_get_run_link_from_properties(properties),
|
|
281
|
+
aliases=aliases,
|
|
266
282
|
status="READY",
|
|
267
283
|
)
|
|
268
284
|
|
|
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="mlflow-tclake-plugin",
|
|
5
|
-
version="2.1.7.
|
|
5
|
+
version="2.1.7.dev5",
|
|
6
6
|
description="Tclake plugin for MLflow",
|
|
7
7
|
packages=find_packages(),
|
|
8
8
|
# Require MLflow as a dependency of the plugin, so that plugin users can simply install
|
|
File without changes
|
|
File without changes
|
{mlflow_tclake_plugin-2.1.7.dev2 → mlflow_tclake_plugin-2.1.7.dev5}/mlflow_tclake_plugin/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|