mlflow-tclake-plugin 2.1.6__tar.gz → 2.1.7.dev2__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.6 → mlflow_tclake_plugin-2.1.7.dev2}/PKG-INFO +1 -1
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin/tclake_store.py +35 -3
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/PKG-INFO +1 -1
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/setup.py +1 -1
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/LICENSE.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/README.md +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin/__init__.py +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/SOURCES.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/dependency_links.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/entry_points.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/requires.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin.egg-info/top_level.txt +0 -0
- {mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/setup.cfg +0 -0
{mlflow_tclake_plugin-2.1.6 → mlflow_tclake_plugin-2.1.7.dev2}/mlflow_tclake_plugin/tclake_store.py
RENAMED
|
@@ -365,7 +365,7 @@ class TCLakeStore(AbstractStore):
|
|
|
365
365
|
resp = self._call("DescribeModelVersions", req_body)
|
|
366
366
|
model_version = None
|
|
367
367
|
for mv in resp["ModelVersions"]:
|
|
368
|
-
if alias in mv
|
|
368
|
+
if alias in (mv.get("Aliases") or []):
|
|
369
369
|
model_version = mv
|
|
370
370
|
break
|
|
371
371
|
if model_version is None:
|
|
@@ -713,10 +713,42 @@ class TCLakeStore(AbstractStore):
|
|
|
713
713
|
self._call("ModifyModelVersionProperties", req)
|
|
714
714
|
|
|
715
715
|
def set_registered_model_alias(self, name, alias, version):
|
|
716
|
-
|
|
716
|
+
log_msg("set_registered_model_alias {} {} {}".format(name, alias, version))
|
|
717
|
+
# 同一模型下别名唯一,若已绑定到某个版本需先删除再重设
|
|
718
|
+
exist_model_version = self._get_model_version_by_alias(name, alias)
|
|
719
|
+
if exist_model_version is not None:
|
|
720
|
+
raise MlflowException(
|
|
721
|
+
"Alias {} already exists for model {}:{}, please delete it first".format(
|
|
722
|
+
alias, name, exist_model_version.version),
|
|
723
|
+
RESOURCE_ALREADY_EXISTS,
|
|
724
|
+
)
|
|
725
|
+
[catalog_name, schema_name, model_name] = self._split_model_name(name)
|
|
726
|
+
req = {
|
|
727
|
+
"CatalogName": catalog_name,
|
|
728
|
+
"SchemaName": schema_name,
|
|
729
|
+
"ModelName": model_name,
|
|
730
|
+
"ModelVersion": _set_model_version(version),
|
|
731
|
+
"AddedAliases": [alias],
|
|
732
|
+
}
|
|
733
|
+
self._call("ModifyModelVersionAliases", req)
|
|
717
734
|
|
|
718
735
|
def delete_registered_model_alias(self, name, alias):
|
|
719
|
-
|
|
736
|
+
log_msg("delete_registered_model_alias {} {}".format(name, alias))
|
|
737
|
+
model_version = self._get_model_version_by_alias(name, alias)
|
|
738
|
+
if model_version is None:
|
|
739
|
+
raise MlflowException(
|
|
740
|
+
"Alias {} does not exist for model {}".format(alias, name),
|
|
741
|
+
INVALID_PARAMETER_VALUE,
|
|
742
|
+
)
|
|
743
|
+
[catalog_name, schema_name, model_name] = self._split_model_name(name)
|
|
744
|
+
req = {
|
|
745
|
+
"CatalogName": catalog_name,
|
|
746
|
+
"SchemaName": schema_name,
|
|
747
|
+
"ModelName": model_name,
|
|
748
|
+
"ModelVersion": _set_model_version(model_version.version),
|
|
749
|
+
"RemovedAliases": [alias],
|
|
750
|
+
}
|
|
751
|
+
self._call("ModifyModelVersionAliases", req)
|
|
720
752
|
|
|
721
753
|
def get_model_version_by_alias(self, name, alias):
|
|
722
754
|
log_msg("get_model_version_by_alias {} {}".format(name, alias))
|
|
@@ -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.
|
|
5
|
+
version="2.1.7.dev2",
|
|
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.6 → mlflow_tclake_plugin-2.1.7.dev2}/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
|