mchades commented on code in PR #14147:
URL: https://github.com/apache/gravitino/pull/14147#discussion_r4408647752


##########
clients/client-python/gravitino/client/semantic_model_catalog_operations.py:
##########
@@ -86,6 +88,42 @@ def list_semantic_models(self, namespace: Namespace) -> 
list[NameIdentifier]:
             for ident in entity_list_resp.identifiers()
         ]
 
+    def list_metrics(self, namespace: Namespace) -> list[NameIdentifier]:
+        self._check_semantic_model_namespace(namespace)
+        resp = self._rest_client.get(
+            self._format_metric_request_path(
+                self._get_semantic_model_full_namespace(namespace)
+            ),
+            params={"details": "false"},
+            error_handler=SEMANTIC_MODEL_ERROR_HANDLER,
+        )
+        response = EntityListResponse.from_json(resp.body, infer_missing=True)
+        response.validate()
+        return [
+            NameIdentifier.builder(
+                self._relative_metric_namespace(ident.namespace()), 
ident.name()
+            )
+            for ident in response.identifiers()
+        ]
+
+    def list_metric_infos(self, namespace: Namespace) -> 
list[SemanticModelMetric]:
+        self._check_semantic_model_namespace(namespace)
+        resp = self._rest_client.get(
+            self._format_metric_request_path(
+                self._get_semantic_model_full_namespace(namespace)
+            ),
+            params={"details": "true"},

Review Comment:
   Keeping the current structure for consistency with 
`list_functions`/`list_function_infos` and 
`list_model_versions`/`list_model_version_infos`, which also construct requests 
separately.



-- 
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