Broken links fixed related to datasets docs (#27569)

fixed the broken links belogs to dataset library of transformers
This commit is contained in:
V.Prasanna kumar
2023-11-18 03:14:09 +05:30
committed by GitHub
parent 638d49983f
commit ffbcfc0166
84 changed files with 118 additions and 118 deletions

View File

@@ -282,7 +282,7 @@ def main():
# Loading a dataset from local json files
datasets = load_dataset("json", data_files=data_files)
# See more about loading any type of standard or custom dataset at
# https://huggingface.co/docs/datasets/loading_datasets.html.
# https://huggingface.co/docs/datasets/loading_datasets.
# Labels
if data_args.task_name is not None:
@@ -299,7 +299,7 @@ def main():
num_labels = 1
else:
# A useful fast method:
# https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.unique
# https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.unique
label_list = datasets["train"].unique("label")
label_list.sort() # Let's sort it for determinism
num_labels = len(label_list)