From 7036c956fe37f6461b49e76d1af205bcab096fe4 Mon Sep 17 00:00:00 2001 From: RamitPahwa Date: Fri, 14 Oct 2022 05:08:55 -0500 Subject: [PATCH] [Doctest] fix doc test for megatron bert (#19600) --- .../models/megatron_bert/configuration_megatron_bert.py | 4 ++-- utils/documentation_tests.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transformers/models/megatron_bert/configuration_megatron_bert.py b/src/transformers/models/megatron_bert/configuration_megatron_bert.py index 93cada5674..a0ec5750fb 100644 --- a/src/transformers/models/megatron_bert/configuration_megatron_bert.py +++ b/src/transformers/models/megatron_bert/configuration_megatron_bert.py @@ -77,12 +77,12 @@ class MegatronBertConfig(PretrainedConfig): Examples: ```python - >>> from transformers import MegatronBertModel, MegatronBertConfig + >>> from transformers import MegatronBertConfig, MegatronBertModel >>> # Initializing a MEGATRON_BERT bert-base-uncased style configuration >>> configuration = MegatronBertConfig() - >>> # Initializing a model from the bert-base-uncased style configuration + >>> # Initializing a model (with random weights) from the bert-base-uncased style configuration >>> model = MegatronBertModel(configuration) >>> # Accessing the model configuration diff --git a/utils/documentation_tests.txt b/utils/documentation_tests.txt index c6ef889fb4..1b9b5c5b08 100644 --- a/utils/documentation_tests.txt +++ b/utils/documentation_tests.txt @@ -68,6 +68,7 @@ src/transformers/models/longt5/modeling_longt5.py src/transformers/models/marian/modeling_marian.py src/transformers/models/markuplm/modeling_markuplm.py src/transformers/models/mbart/modeling_mbart.py +src/transformers/models/megatron_bert/configuration_megatron_bert.py src/transformers/models/mobilebert/configuration_mobilebert.py src/transformers/models/mobilebert/modeling_mobilebert.py src/transformers/models/mobilebert/modeling_tf_mobilebert.py