Merge remote-tracking branch 'origin/julien_multiple-choice' into encoding-qol

This commit is contained in:
thomwolf
2019-10-04 15:48:06 -04:00
5 changed files with 127 additions and 152 deletions

View File

@@ -271,7 +271,7 @@ def load_and_cache_examples(args, task, tokenizer, evaluate=False):
list(filter(None, args.model_name_or_path.split('/'))).pop(),
str(args.max_seq_length),
str(task)))
if os.path.exists(cached_features_file):
if os.path.exists(cached_features_file) and not args.overwrite_cache:
logger.info("Loading features from cached file %s", cached_features_file)
features = torch.load(cached_features_file)
else: