diff --git a/bert_sklearn/config.py b/bert_sklearn/config.py index eec63a5..36ea24e 100644 --- a/bert_sklearn/config.py +++ b/bert_sklearn/config.py @@ -99,9 +99,9 @@ def __init__(self, tokenizer=None, max_seq_length=64, train_sampler='random', self.ignore_label_id = np.array(self.ignore_label_id) def __repr__(self): - attrs = ["%s=%s"%(key, val) for key, val in vars(self).items()] - attrs = ",".join(attrs) - return f'{self.__class__.__name__}({attrs})' + attrs = ['{}={}'.format(key, val) for key, val in vars(self).items()] + attrs = ','.join(attrs) + return '{}({})'.format(self.__class__.__name__, attrs) def model2config(model):