"vscode:/vscode.git/clone" did not exist on "2870fd198f25ece3b01b80d0eb041e49f376bca2"
Unverified Commit ffbcfc01 authored by V.Prasanna kumar's avatar V.Prasanna kumar Committed by GitHub
Browse files

Broken links fixed related to datasets docs (#27569)

fixed the broken links belogs to dataset library of transformers
parent 638d4998
...@@ -290,7 +290,7 @@ def main(): ...@@ -290,7 +290,7 @@ def main():
# Loading a dataset from local json files # Loading a dataset from local json files
datasets = load_dataset("json", data_files=data_files, cache_dir=model_args.cache_dir) datasets = load_dataset("json", data_files=data_files, cache_dir=model_args.cache_dir)
# See more about loading any type of standard or custom dataset at # 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.
# endregion # endregion
# region Label preprocessing # region Label preprocessing
......
...@@ -269,7 +269,7 @@ def main(): ...@@ -269,7 +269,7 @@ def main():
token=model_args.token, token=model_args.token,
) )
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at # See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
# https://huggingface.co/docs/datasets/loading_datasets.html. # https://huggingface.co/docs/datasets/loading_datasets.
if raw_datasets["train"] is not None: if raw_datasets["train"] is not None:
column_names = raw_datasets["train"].column_names column_names = raw_datasets["train"].column_names
......
...@@ -290,7 +290,7 @@ def main(): ...@@ -290,7 +290,7 @@ def main():
extension = "text" extension = "text"
raw_datasets = load_dataset(extension, data_files=data_files) raw_datasets = load_dataset(extension, data_files=data_files)
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at # See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
# https://huggingface.co/docs/datasets/loading_datasets.html. # https://huggingface.co/docs/datasets/loading_datasets.
# Load pretrained model and tokenizer # Load pretrained model and tokenizer
# #
...@@ -735,7 +735,7 @@ def main(): ...@@ -735,7 +735,7 @@ def main():
extension = args.train_file.split(".")[-1] extension = args.train_file.split(".")[-1]
raw_datasets = load_dataset(extension, data_files=data_files) raw_datasets = load_dataset(extension, data_files=data_files)
# See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at # See more about loading any type of standard or custom dataset (from files, python dict, pandas DataFrame, etc) at
# https://huggingface.co/docs/datasets/loading_datasets.html. # https://huggingface.co/docs/datasets/loading_datasets.
# Load pretrained model and tokenizer # Load pretrained model and tokenizer
# #
......
...@@ -282,7 +282,7 @@ def main(): ...@@ -282,7 +282,7 @@ def main():
# Loading a dataset from local json files # Loading a dataset from local json files
datasets = load_dataset("json", data_files=data_files) datasets = load_dataset("json", data_files=data_files)
# See more about loading any type of standard or custom dataset at # 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 # Labels
if data_args.task_name is not None: if data_args.task_name is not None:
...@@ -299,7 +299,7 @@ def main(): ...@@ -299,7 +299,7 @@ def main():
num_labels = 1 num_labels = 1
else: else:
# A useful fast method: # 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 = datasets["train"].unique("label")
label_list.sort() # Let's sort it for determinism label_list.sort() # Let's sort it for determinism
num_labels = len(label_list) num_labels = len(label_list)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment