From f382a8decda82062bb6911f05b646f404eacfdd4 Mon Sep 17 00:00:00 2001 From: Luran He Date: Thu, 10 Oct 2019 16:27:53 -0400 Subject: [PATCH] convert int to str before adding to a str --- examples/run_lm_finetuning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/run_lm_finetuning.py b/examples/run_lm_finetuning.py index 3116faed67..571bcb4391 100644 --- a/examples/run_lm_finetuning.py +++ b/examples/run_lm_finetuning.py @@ -66,7 +66,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, 'cached_lm_' + block_size + '_' + filename) + cached_features_file = os.path.join(directory, 'cached_lm_' + str(block_size) + '_' + filename) if os.path.exists(cached_features_file): logger.info("Loading features from cached file %s", cached_features_file)