From ab7f5d2943d1f42a1e329d48538fdea6787e89d2 Mon Sep 17 00:00:00 2001 From: thomwolf Date: Mon, 18 Feb 2019 11:33:54 +0100 Subject: [PATCH] simple --- pytorch_pretrained_bert/tokenization_gpt2.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pytorch_pretrained_bert/tokenization_gpt2.py b/pytorch_pretrained_bert/tokenization_gpt2.py index f76651402d..96b0ece7f0 100644 --- a/pytorch_pretrained_bert/tokenization_gpt2.py +++ b/pytorch_pretrained_bert/tokenization_gpt2.py @@ -27,10 +27,8 @@ try: except ImportError: # Just a dummy decorator to get the checks to run on python2 # because honestly I don't want to support a byte-level unicode BPE tokenizer on python 2 right now. - def lru_cache(func): - def func_wrapper(*inputs, **args): - return func(inputs, args) - return func_wrapper + def lru_cache(): + return lambda func: func from .file_utils import cached_path