"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "422159477809730c85fadd06ef9dd3cefb3deb32"
Commit f7978f70 authored by thomwolf's avatar thomwolf
Browse files

use format instead of f-strings

parent f0340ecc
...@@ -57,7 +57,7 @@ class TextDataset(Dataset): ...@@ -57,7 +57,7 @@ class TextDataset(Dataset):
def __init__(self, tokenizer, file_path='train', block_size=512): def __init__(self, tokenizer, file_path='train', block_size=512):
assert os.path.isfile(file_path) assert os.path.isfile(file_path)
directory, filename = os.path.split(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_{}_{}'.format(block_size, filename))
if os.path.exists(cached_features_file): if os.path.exists(cached_features_file):
logger.info("Loading features from cached file %s", cached_features_file) logger.info("Loading features from cached file %s", cached_features_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment