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
8e093e59
"vscode:/vscode.git/clone" did not exist on "8d1d1ffde25f6c7b3c472bd8f82f462b14ab8c11"
Commit
8e093e59
authored
Apr 23, 2020
by
peterandluc
Committed by
Julien Chaumond
Apr 23, 2020
Browse files
Remove 50k limits bug
parent
6af5a54c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
src/transformers/data/datasets/language_modeling.py
src/transformers/data/datasets/language_modeling.py
+0
-1
No files found.
src/transformers/data/datasets/language_modeling.py
View file @
8e093e59
...
...
@@ -90,7 +90,6 @@ class LineByLineTextDataset(Dataset):
with
open
(
file_path
,
encoding
=
"utf-8"
)
as
f
:
lines
=
[
line
for
line
in
f
.
read
().
splitlines
()
if
(
len
(
line
)
>
0
and
not
line
.
isspace
())]
lines
=
lines
[:
50_000
]
batch_encoding
=
tokenizer
.
batch_encode_plus
(
lines
,
add_special_tokens
=
True
,
max_length
=
block_size
)
self
.
examples
=
batch_encoding
[
"input_ids"
]
...
...
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