TensorBay supports tagging specific commits in a dataset’s history as being important. Typically, people use this functionality to mark release revisions (v1.0, v2.0 and so on).
Before operating tags, a dataset client instance with existing commit is needed.
from tensorbay import GAS # Please visit `https://gas.graviti.com/tensorbay/developer` to get the AccessKey. gas = GAS("<YOUR_ACCESSKEY>") dataset_client = gas.create_dataset("<DATASET_NAME>") dataset_client.create_draft("draft-1") # do the modifications in this draft
TensorBay SDK supports three approaches of creating the tag.
First is to create the tag when committing.
Second is to create the tag straightforwardly, which is based on the current commit.
Third is to create tag on an existing commit.
commit_id = dataset_client.status.commit_id dataset_client.create_tag("Tag-1", revision=commit_id)
tag = dataset_client.get_tag("Tag-1")