From cd09bc1c736542002f1c3d734b909ed5b5e47102 Mon Sep 17 00:00:00 2001 From: Srijan Sahay Srivastava <70461251+SrijanSahaySrivastava@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:51:24 +0530 Subject: [PATCH] [Doctest] Add `configuration_encoder_decoder.py` (#26519) * [Doctest] Add configuration_encoder_decoder.py Added configuration_encoder_decoder.py to utils/documentation_tests.txt for doctest * Revert "[Doctest] Add configuration_encoder_decoder.py" This reverts commit bd653535a4356dc3c9f43e65883819079a2053b0. * [Doctest] Add configuration_encoder_decoder.py add configuration_encoder_decoder.py to utils/documentation_tests.txt * [Doctest] Add configuration_encoder_decoder.py add configuration_encoder_decoder.py to utils/documentation_tests.txt * [Doctest] Add configuration_encoder_decoder.py add configuration_encoder_decoder.py to utils/documentation_tests.txt * changed as per request * fixed line 46 --- .../models/encoder_decoder/configuration_encoder_decoder.py | 2 +- utils/not_doctested.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py b/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py index f7eda78e5c0519..15fed4dbd1bb53 100644 --- a/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py +++ b/src/transformers/models/encoder_decoder/configuration_encoder_decoder.py @@ -51,7 +51,7 @@ class EncoderDecoderConfig(PretrainedConfig): >>> config = EncoderDecoderConfig.from_encoder_decoder_configs(config_encoder, config_decoder) - >>> # Initializing a Bert2Bert model from the bert-base-uncased style configurations + >>> # Initializing a Bert2Bert model (with random weights) from the bert-base-uncased style configurations >>> model = EncoderDecoderModel(config=config) >>> # Accessing the model configuration diff --git a/utils/not_doctested.txt b/utils/not_doctested.txt index 12c6f21a3d1428..617385cabb94f9 100644 --- a/utils/not_doctested.txt +++ b/utils/not_doctested.txt @@ -530,7 +530,6 @@ src/transformers/models/electra/convert_electra_original_tf_checkpoint_to_pytorc src/transformers/models/electra/modeling_flax_electra.py src/transformers/models/encodec/configuration_encodec.py src/transformers/models/encodec/convert_encodec_checkpoint_to_pytorch.py -src/transformers/models/encoder_decoder/configuration_encoder_decoder.py src/transformers/models/encoder_decoder/modeling_encoder_decoder.py src/transformers/models/encoder_decoder/modeling_flax_encoder_decoder.py src/transformers/models/encoder_decoder/modeling_tf_encoder_decoder.py