Broken links fixed related to datasets docs (#27569)
fixed the broken links belogs to dataset library of transformers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user