gravitino.api.model_version_change.ModelVersionChange¶
- class gravitino.api.model_version_change.ModelVersionChange¶
Bases:
ABC
A model version change is a change to a model version. It can be used to update the comment of a model version, set a property and value pair for a model version, or remove a property from a model.
- __init__()¶
Methods
__init__
()add_uri
(uri_name, uri)Creates a new model version change to add the uri of the model version. Args: uri_name: The uri name of the model version to be added. uri: The new uri of the model version to be added. Returns: The model version change.
remove_property
(key)Creates a new model version change to remove a property from the model version. Args: key: The key of the property. Returns: The model version change.
remove_uri
(uri_name)Creates a new model version change to remove the uri of the model version. Args: uri_name: The uri name of the model version to be removed. Returns: The model version change.
set_property
(key, value)Creates a new model version change to set a property and value pair for the model version. Args: key: The key of the property. value: The value of the property. Returns: The model version change.
update_aliases
(aliases_to_add, aliases_to_remove)Creates a new model version change to update the aliases of the model version. Args: aliases_to_add: The new aliases to add to the model version. aliases_to_remove: The aliases to remove from the model version. Returns: The model version change.
update_comment
(comment)Creates a new model version change to update the comment of the model version. Args: comment: The new comment of the model version. Returns: The model version change.
update_uri
(uri[, uri_name])Creates a new model version change to update the uri of the model version. Args: uri: The new uri of the model version. uri_name: The uri name of the model version to be updated. Returns: The model version change.
- class AddUri(uri_name: str, uri: str)¶
Bases:
object
A ModelVersionChange to add a uri of the model version.
- uri() str ¶
Retrieves the URI of the model version to be added. Returns:
The new URI of the model version to be added.
- uri_name() str ¶
Retrieves the URI name of the model version to be added. Returns:
The URI name of the model version to be added.
- class RemoveProperty(key: str)¶
Bases:
object
A model version change to remove a property from the model version.
- property() str ¶
Retrieves the name of the property. Returns:
The name of the property.
- class RemoveUri(uri_name: str)¶
Bases:
object
A ModelVersionChange to remove a uri of the model version.
- uri_name() str ¶
Retrieves the URI name of the model version to be removed. Returns:
The URI name of the model version to be removed.
- class SetProperty(key: str, value: str)¶
Bases:
object
A model version change to set a property and value pair for the model version.
- property() str ¶
Retrieves the name of the property. Returns:
The name of the property.
- value() str ¶
Retrieves the value of the property. Returns:
The value of the property.
- class UpdateAliases(aliases_to_add, aliases_to_remove)¶
Bases:
object
A model version change to update the aliases of the model version.
- aliases_to_add()¶
Retrieves the aliases to add. Returns:
The aliases to add.
- aliases_to_remove()¶
Retrieves the aliases to remove. Returns:
The aliases to remove.
- class UpdateComment(new_comment: str)¶
Bases:
object
A model version change to update the comment of the model version.
- new_comment() str ¶
Retrieves the new comment of the model version. Returns:
The new comment of the model version.
- class UpdateUri(new_uri: str, uri_name: str | None = None)¶
Bases:
object
A model version change to update the URI of the model version.
- new_uri() str ¶
Retrieves the new URI of the model version. Returns:
The new URI of the model version.
- uri_name() str ¶
Retrieves the URI name of the model version to be updated. Returns:
The URI name of the model version to be updated.
- static add_uri(uri_name: str, uri: str)¶
Creates a new model version change to add the uri of the model version. Args:
uri_name: The uri name of the model version to be added. uri: The new uri of the model version to be added.
- Returns:
The model version change.
- static remove_property(key: str)¶
Creates a new model version change to remove a property from the model version. Args:
key: The key of the property.
- Returns:
The model version change.
- static remove_uri(uri_name: str)¶
Creates a new model version change to remove the uri of the model version. Args:
uri_name: The uri name of the model version to be removed.
- Returns:
The model version change.
- static set_property(key, value)¶
Creates a new model version change to set a property and value pair for the model version. Args:
key: The key of the property. value: The value of the property.
- Returns:
The model version change.
- static update_aliases(aliases_to_add, aliases_to_remove)¶
Creates a new model version change to update the aliases of the model version. Args:
aliases_to_add: The new aliases to add to the model version. aliases_to_remove: The aliases to remove from the model version.
- Returns:
The model version change.
- static update_comment(comment: str)¶
Creates a new model version change to update the comment of the model version. Args:
comment: The new comment of the model version.
- Returns:
The model version change.
- static update_uri(uri: str, uri_name: str | None = None)¶
Creates a new model version change to update the uri of the model version. Args:
uri: The new uri of the model version. uri_name: The uri name of the model version to be updated.
- Returns:
The model version change.