maom's picture
Update sections/06_versioning.md
5e17889 verified
|
Raw
History Blame Contribute Delete
1.02 kB

6 Tag the version of the curation

Once you have made a dataset public, create a tagged branch using the create_tag function that allows for including the dataset in reproducible workflows. Versions typically follow standard semantic versioning guidelines of <major>.<minor>.<patch>.

import huggingface_hub  
huggingface_hub.create_tag(  
  repo_id = "<org_name>/<dataset_name\>",  
  tag = "<version>",  
  tag_message = "<message>",  
  repo_type = "dataset")

To access the tagged branch from the web-interface, go to the dataset → Files and version → select from the drop-down menu the tagged version:
![][image1]
To download a specific tagged branch for a dataset, add the revision="<version>" argument to load_dataset():

import datasets  
dataset = datasets.load_dataset("<org_name>/<dataset_name>", `revision="1.0"`)