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
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "6f152572cd0fe5c84127a1bc25668e5fce918744"
Commit
079bfb32
authored
Oct 25, 2019
by
altsoph
Committed by
Lysandre Debut
Oct 28, 2019
Browse files
Evaluation fixed.
parent
438f2730
Changes
1
Show 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):
...
@@ -86,7 +86,6 @@ class TextDataset(Dataset):
# Note that we are loosing the last truncated example here for the sake of simplicity (no padding)
# 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
# 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.
# 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
)
logger
.
info
(
"Saving features into cached file %s"
,
cached_features_file
)
with
open
(
cached_features_file
,
'wb'
)
as
handle
:
with
open
(
cached_features_file
,
'wb'
)
as
handle
:
...
...
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