convert int to str before adding to a str

This commit is contained in:
Luran He authored and Lysandre Debut committed 2019-10-10 19:20:39 -04:00
1 parent 6596e3d566
commit f382a8decd
1 file changed
+1 -1
+1 -1
View File
@@ -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)