From c6c5c3fd4e080527463e75c522ffa7b36b57355d Mon Sep 17 00:00:00 2001 From: thomwolf Date: Fri, 7 Feb 2020 08:58:06 +0100 Subject: [PATCH] style and quality --- src/transformers/modeling_tf_utils.py | 4 +++- src/transformers/modeling_utils.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/transformers/modeling_tf_utils.py b/src/transformers/modeling_tf_utils.py index e5b00a68d7..d15b02fbd8 100644 --- a/src/transformers/modeling_tf_utils.py +++ b/src/transformers/modeling_tf_utils.py @@ -303,7 +303,9 @@ class TFPreTrainedModel(tf.keras.Model, TFModelUtilsMixin): elif os.path.isfile(pretrained_model_name_or_path + ".index"): archive_file = pretrained_model_name_or_path + ".index" else: - archive_file = hf_bucket_url(pretrained_model_name_or_path, postfix=(WEIGHTS_NAME if from_pt else TF2_WEIGHTS_NAME)) + archive_file = hf_bucket_url( + pretrained_model_name_or_path, postfix=(WEIGHTS_NAME if from_pt else TF2_WEIGHTS_NAME) + ) # redirect to the cache, if necessary try: diff --git a/src/transformers/modeling_utils.py b/src/transformers/modeling_utils.py index d8389e647e..07894cf0e0 100644 --- a/src/transformers/modeling_utils.py +++ b/src/transformers/modeling_utils.py @@ -421,7 +421,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin): ) archive_file = pretrained_model_name_or_path + ".index" else: - archive_file = hf_bucket_url(pretrained_model_name_or_path, postfix=(TF2_WEIGHTS_NAME if from_tf else WEIGHTS_NAME)) + archive_file = hf_bucket_url( + pretrained_model_name_or_path, postfix=(TF2_WEIGHTS_NAME if from_tf else WEIGHTS_NAME) + ) # redirect to the cache, if necessary try: