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
079bfb32
Commit
079bfb32
authored
Oct 25, 2019
by
altsoph
Committed by
Lysandre Debut
Oct 28, 2019
Browse files
Evaluation fixed.
parent
438f2730
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
examples/run_lm_finetuning.py
examples/run_lm_finetuning.py
+1
-2
No files found.
examples/run_lm_finetuning.py
View file @
079bfb32
...
...
@@ -86,7 +86,6 @@ class TextDataset(Dataset):
# Note that we are loosing the last truncated example here for the sake of simplicity (no padding)
# If your dataset is small, first you should loook for a bigger one :-) and second you
# can change this behavior by adding (model specific) padding.
self
.
examples
.
append
(
tokenizer
.
build_inputs_with_special_tokens
(
tokenized_text
[
-
block_size
:]))
# DIRTY!
logger
.
info
(
"Saving features into cached file %s"
,
cached_features_file
)
with
open
(
cached_features_file
,
'wb'
)
as
handle
:
...
...
@@ -543,4 +542,4 @@ def main():
if
__name__
==
"__main__"
:
main
()
\ No newline at end of file
main
()
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