maom commited on
Commit
3044e81
·
verified ·
1 Parent(s): c07119d

Update sections/06_versioning.md

Browse files
Files changed (1) hide show
  1. sections/06_versioning.md +8 -8
sections/06_versioning.md CHANGED
@@ -2,16 +2,16 @@
2
 
3
  Once you have made a dataset public, create a tagged branch using the [`create_tag`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_tag) function that allows for including the dataset in reproducible workflows. Versions typically follow standard [semantic versioning guidelines](https://semver.org/) of `<major>.<minor>.<patch>`.
4
 
5
- import huggingface\_hub
6
- huggingface\_hub.create\_tag(
7
- repo\_id \= "\<org\_name\>/\<dataset\_name\>",
8
- tag \= "\<version\>",
9
- tag\_message \= "\<message\>",
10
- repo\_type \= "dataset")
11
 
12
  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:
13
  ![][image1]
14
  To download a specific tagged branch for a dataset, add the `revision="<version>"` argument to `load_dataset()`:
15
 
16
- import datasets
17
- dataset \= datasets.load\_dataset("\<org\_name\>/\<dataset\_name\>", `revision="1.0"`)
 
2
 
3
  Once you have made a dataset public, create a tagged branch using the [`create_tag`](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.create_tag) function that allows for including the dataset in reproducible workflows. Versions typically follow standard [semantic versioning guidelines](https://semver.org/) of `<major>.<minor>.<patch>`.
4
 
5
+ import huggingface_hub
6
+ huggingface_hub.create_tag(
7
+ repo_id = "<org_name>/<dataset_name\>",
8
+ tag = "<version>",
9
+ tag_message = "<message>",
10
+ repo_type = "dataset")
11
 
12
  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:
13
  ![][image1]
14
  To download a specific tagged branch for a dataset, add the `revision="<version>"` argument to `load_dataset()`:
15
 
16
+ import datasets
17
+ dataset = datasets.load_dataset("<org_name>/<dataset_name>", `revision="1.0"`)