Abyss-lord commented on code in PR #10670:
URL: https://github.com/apache/gravitino/pull/10670#discussion_r3107882068


##########
clients/client-python/gravitino/client/generic_model.py:
##########
@@ -14,19 +14,47 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+
+from __future__ import annotations
+
 from typing import Optional
 
+from gravitino.api.metadata_object import MetadataObject
+from gravitino.api.metadata_objects import MetadataObjects
 from gravitino.api.model.model import Model
+from gravitino.api.tag import Tag
+from gravitino.api.tag.supports_tags import SupportsTags
+from gravitino.client.metadata_object_tag_operations import 
MetadataObjectTagOperations
 from gravitino.dto.audit_dto import AuditDTO
 from gravitino.dto.model_dto import ModelDTO
+from gravitino.namespace import Namespace
+from gravitino.utils import HTTPClient
 
 
-class GenericModel(Model):
+class GenericModel(Model, SupportsTags):
     _model_dto: ModelDTO
     """The model DTO object."""
 
-    def __init__(self, model_dto: ModelDTO):
+    def __init__(
+        self, model_dto: ModelDTO, rest_client: HTTPClient, model_ns: Namespace
+    ) -> None:
         self._model_dto = model_dto
+        model_full_name = [model_ns.level(1), model_ns.level(2), 
model_dto.name()]
+        model_object: MetadataObject = MetadataObjects.of(
+            model_full_name, MetadataObject.Type.MODEL
+        )
+        self._model_tag_opearions = MetadataObjectTagOperations(
+            model_ns.level(0), model_object, rest_client
+        )

Review Comment:
   fix



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to