From ea3c2c027769980c0501dc615ef7e755d206af62 Mon Sep 17 00:00:00 2001 From: gudwls215 <96422648+gudwls215@users.noreply.github.com> Date: Tue, 8 Jul 2025 17:20:52 +0900 Subject: [PATCH] Fix license text, duplicate assignment, and typo in constant names (#39250) - Complete Apache License text in Italian documentation - Remove duplicate variable assignment in Perceiver converter - Fix typo in MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES constant --- docs/source/it/perf_train_special.md | 1 + .../models/perceiver/convert_perceiver_haiku_to_pytorch.py | 2 +- utils/update_metadata.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/it/perf_train_special.md b/docs/source/it/perf_train_special.md index afe05d801d..23ba034e8e 100644 --- a/docs/source/it/perf_train_special.md +++ b/docs/source/it/perf_train_special.md @@ -7,6 +7,7 @@ http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. ⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. diff --git a/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py b/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py index 082b944937..e8876eac70 100644 --- a/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py +++ b/src/transformers/models/perceiver/convert_perceiver_haiku_to_pytorch.py @@ -148,7 +148,7 @@ def rename_keys(state_dict, architecture): ) name = name.replace("classification_decoder/~/basic_decoder/output/b", "decoder.decoder.final_layer.bias") name = name.replace("classification_decoder/~/basic_decoder/output/w", "decoder.decoder.final_layer.weight") - name = name = name.replace("classification_decoder/~/basic_decoder/~/", "decoder.decoder.") + name = name.replace("classification_decoder/~/basic_decoder/~/", "decoder.decoder.") name = name.replace("basic_decoder/cross_attention/", "decoder.decoding_cross_attention.") name = name.replace("basic_decoder/~/", "decoder.") diff --git a/utils/update_metadata.py b/utils/update_metadata.py index 41b3c9a7ad..8d60c4b374 100755 --- a/utils/update_metadata.py +++ b/utils/update_metadata.py @@ -109,7 +109,7 @@ PIPELINE_TAGS_AND_AUTO_MODELS = [ "MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES", "AutoModelForVisualQuestionAnswering", ), - ("image-to-text", "MODEL_FOR_FOR_VISION_2_SEQ_MAPPING_NAMES", "AutoModelForVision2Seq"), + ("image-to-text", "MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES", "AutoModelForVision2Seq"), ( "zero-shot-image-classification", "MODEL_FOR_ZERO_SHOT_IMAGE_CLASSIFICATION_MAPPING_NAMES",