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
963529e2
Unverified
Commit
963529e2
authored
Oct 01, 2019
by
Thomas Wolf
Committed by
GitHub
Oct 01, 2019
Browse files
Merge pull request #1288 from echan00/master
Typo with LM Fine tuning script
parents
1e4a1913
f7978f70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_lm_finetuning.py
examples/run_lm_finetuning.py
+1
-1
No files found.
examples/run_lm_finetuning.py
View file @
963529e2
...
...
@@ -59,7 +59,7 @@ class TextDataset(Dataset):
def
__init__
(
self
,
tokenizer
,
file_path
=
'train'
,
block_size
=
512
):
assert
os
.
path
.
isfile
(
file_path
)
directory
,
filename
=
os
.
path
.
split
(
file_path
)
cached_features_file
=
os
.
path
.
join
(
directory
,
f
'cached_lm_
{
block_size
}
_
{
filename
}
'
)
cached_features_file
=
os
.
path
.
join
(
directory
,
'cached_lm_{
}_{}'
.
format
(
block_size
,
filename
)
)
if
os
.
path
.
exists
(
cached_features_file
):
logger
.
info
(
"Loading features from cached file %s"
,
cached_features_file
)
...
...
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