You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "xiaozcy (via GitHub)" <gi...@apache.org> on 2025/08/28 08:17:31 UTC

[PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

xiaozcy opened a new pull request, #8329:
URL: https://github.com/apache/gravitino/pull/8329

   ### What changes were proposed in this pull request?
   
   Update docs for usage of model version with multiple URIs.
   
   ### Why are the changes needed?
   
   Fix: #7439 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   No need.
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "xiaozcy (via GitHub)" <gi...@apache.org>.
xiaozcy commented on code in PR #8329:
URL: https://github.com/apache/gravitino/pull/8329#discussion_r2313168901


##########
docs/manage-model-metadata-using-gravitino.md:
##########
@@ -631,6 +683,84 @@ model_version: ModelVersion = catalog.as_model_catalog().get_model_version_by_al
 </TabItem>
 </Tabs>
 
+### Get ModelVersion URI
+
+You can get the URI of a ModelVersion by sending a `GET` request to the `/api/metalakes/{metalake_name}
+/catalogs/{catalog_name}/schemas/{schema_name}/models/{model_name}/versions/{version_number}/uri?uriName={uriName}`
+endpoint or by using the Gravitino Java/Python client. The following is an example of getting
+the URI of a ModelVersion:
+
+<Tabs groupId="language" queryString>
+<TabItem value="shell" label="Shell">
+
+```shell
+curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \
+-H "Content-Type: application/json" \
+http://localhost:8090/api/metalakes/example/catalogs/model_catalog/schemas/model_schema/models/example_model/versions/0/uri?uriName=s3

Review Comment:
   Added.



##########
docs/manage-model-metadata-using-gravitino.md:
##########
@@ -553,6 +553,58 @@ catalog.as_model_catalog().link_model_version(model_ident=NameIdentifier.of("mod
 
 The comment and properties of ModelVersion can be different from the model.
 
+You can also link a ModelVersion with multiple model URIs. The URIs is a map of URI name to URI. 
+The following is an example of linking a ModelVersion with multiple model URIs:

Review Comment:
   Added.



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #8329:
URL: https://github.com/apache/gravitino/pull/8329#discussion_r2308903727


##########
docs/manage-model-metadata-using-gravitino.md:
##########
@@ -631,6 +683,84 @@ model_version: ModelVersion = catalog.as_model_catalog().get_model_version_by_al
 </TabItem>
 </Tabs>
 
+### Get ModelVersion URI
+
+You can get the URI of a ModelVersion by sending a `GET` request to the `/api/metalakes/{metalake_name}
+/catalogs/{catalog_name}/schemas/{schema_name}/models/{model_name}/versions/{version_number}/uri?uriName={uriName}`
+endpoint or by using the Gravitino Java/Python client. The following is an example of getting
+the URI of a ModelVersion:
+
+<Tabs groupId="language" queryString>
+<TabItem value="shell" label="Shell">
+
+```shell
+curl -X GET -H "Accept: application/vnd.gravitino.v1+json" \
+-H "Content-Type: application/json" \
+http://localhost:8090/api/metalakes/example/catalogs/model_catalog/schemas/model_schema/models/example_model/versions/0/uri?uriName=s3

Review Comment:
   I remembered that `uriName` can be null, can you also give an example and explain the behavior?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "xiaozcy (via GitHub)" <gi...@apache.org>.
xiaozcy commented on PR #8329:
URL: https://github.com/apache/gravitino/pull/8329#issuecomment-3241925909

   > @xiaozcy, I found that you don't add the REST API in `openapi.yaml` for `uri` related GET APIs, can you please fix it in this PR?
   
   Done.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #8329:
URL: https://github.com/apache/gravitino/pull/8329#issuecomment-3241662435

   @xiaozcy, I found that you don't add the REST API in `openapi.yaml` for `uri` related GET APIs, can you please fix it in this PR? 


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao merged PR #8329:
URL: https://github.com/apache/gravitino/pull/8329


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7439] minor(doc): Update docs for usage of model version with multiple URIs [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #8329:
URL: https://github.com/apache/gravitino/pull/8329#discussion_r2308902480


##########
docs/manage-model-metadata-using-gravitino.md:
##########
@@ -553,6 +553,58 @@ catalog.as_model_catalog().link_model_version(model_ident=NameIdentifier.of("mod
 
 The comment and properties of ModelVersion can be different from the model.
 
+You can also link a ModelVersion with multiple model URIs. The URIs is a map of URI name to URI. 
+The following is an example of linking a ModelVersion with multiple model URIs:

Review Comment:
   Can you also add some words to example what is the default uri, and how to get the default uri with default name "unknown"?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org