DatasetVersion¶
- class verta.dataset.entities.DatasetVersion(conn, conf, msg)¶
Object representing a ModelDB dataset version.
Changed in version 0.16.0: The dataset versioning interface was updated for flexibility, robustness, and consistency with other ModelDB entities.
This class provides read/write functionality for dataset version metadata and access to its content.
There should not be a need to instantiate this class directly; please use
Dataset.create_version()
.- Variables:
- add_attribute(key, value)¶
Adds an attribute to this dataset version.
- add_attributes(attrs)¶
Adds potentially multiple attributes to this dataset version.
- add_tags(tags)¶
Adds multiple tags to this dataset version.
- del_attribute(key)¶
Deletes the attribute with name key from this dataset version.
This method will not raise an error if the attribute does not exist.
- Parameters:
key (str) – Name of the attribute.
- del_tag(tag)¶
Deletes a tag from this dataset version.
This method will not raise an error if the tag does not exist.
- Parameters:
tag (str) – Tag to delete.
- delete()¶
Deletes this dataset version.
- get_attribute(key)¶
Gets the attribute with name key from this dataset version.
- Parameters:
key (str) – Name of the attribute.
- Returns:
one of {None, bool, float, int, str} – Value of the attribute.
- get_attributes()¶
Gets all attributes from this dataset version.
- Returns:
dict of str to {None, bool, float, int, str} – Names and values of all attributes.
- get_content()¶
Returns the content of this dataset version.
- Returns:
dataset (
dataset
) – Dataset content.
- get_description()¶
Gets the description of this dataset version.
- Returns:
str – Description of this dataset version.
- get_tags()¶
Gets all tags from this dataset version.
- Returns:
list of str – All tags.
- list_components()¶
Shorthand for
get_content().list_components()
.