Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ffbcfc01
Unverified
Commit
ffbcfc01
authored
Nov 18, 2023
by
V.Prasanna kumar
Committed by
GitHub
Nov 17, 2023
Browse files
Broken links fixed related to datasets docs (#27569)
fixed the broken links belogs to dataset library of transformers
parent
638d4998
Changes
84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
examples/tensorflow/text-classification/run_text_classification.py
...tensorflow/text-classification/run_text_classification.py
+1
-1
examples/tensorflow/token-classification/run_ner.py
examples/tensorflow/token-classification/run_ner.py
+1
-1
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
...directory_name}}/run_{{cookiecutter.example_shortcut}}.py
+2
-2
tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
...s/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
+2
-2
No files found.
examples/tensorflow/text-classification/run_text_classification.py
View file @
ffbcfc01
...
...
@@ -290,7 +290,7 @@ def main():
# Loading a dataset from local json files
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
# https://huggingface.co/docs/datasets/loading_datasets.
html.
# https://huggingface.co/docs/datasets/loading_datasets.
# endregion
# region Label preprocessing
...
...
examples/tensorflow/token-classification/run_ner.py
View file @
ffbcfc01
...
...
@@ -269,7 +269,7 @@ def main():
token
=
model_args
.
token
,
)
# 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
:
column_names
=
raw_datasets
[
"train"
].
column_names
...
...
templates/adding_a_new_example_script/{{cookiecutter.directory_name}}/run_{{cookiecutter.example_shortcut}}.py
View file @
ffbcfc01
...
...
@@ -290,7 +290,7 @@ def main():
extension
=
"text"
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
# https://huggingface.co/docs/datasets/loading_datasets.
html.
# https://huggingface.co/docs/datasets/loading_datasets.
# Load pretrained model and tokenizer
#
...
...
@@ -735,7 +735,7 @@ def main():
extension
=
args
.
train_file
.
split
(
"."
)[
-
1
]
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
# https://huggingface.co/docs/datasets/loading_datasets.
html.
# https://huggingface.co/docs/datasets/loading_datasets.
# Load pretrained model and tokenizer
#
...
...
tests/sagemaker/scripts/pytorch/run_glue_model_parallelism.py
View file @
ffbcfc01
...
...
@@ -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
)
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment