From 684165b882547c59c8694d07dac12cf3afb2a6e7 Mon Sep 17 00:00:00 2001 From: Akshita Prasanth <97516055+ak04p@users.noreply.github.com> Date: Tue, 18 Oct 2022 00:23:24 +0530 Subject: [PATCH] [Doctest] Add configuration_realm.py (#19646) * Update configuration_realm.py * realm config for doctest * Update configuration_realm.py doc * Update documentation_tests * clean up Co-authored-by: ydshieh --- src/transformers/models/realm/configuration_realm.py | 4 ++-- utils/documentation_tests.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transformers/models/realm/configuration_realm.py b/src/transformers/models/realm/configuration_realm.py index 8d816a736e..2b7ec5f2e0 100644 --- a/src/transformers/models/realm/configuration_realm.py +++ b/src/transformers/models/realm/configuration_realm.py @@ -116,12 +116,12 @@ class RealmConfig(PretrainedConfig): Example: ```python - >>> from transformers import RealmEmbedder, RealmConfig + >>> from transformers import RealmConfig, RealmEmbedder >>> # Initializing a REALM realm-cc-news-pretrained-* style configuration >>> configuration = RealmConfig() - >>> # Initializing a model from the google/realm-cc-news-pretrained-embedder style configuration + >>> # Initializing a model (with random weights) from the google/realm-cc-news-pretrained-embedder style configuration >>> model = RealmEmbedder(configuration) >>> # Accessing the model configuration diff --git a/utils/documentation_tests.txt b/utils/documentation_tests.txt index e6a3a1ff7e..46e1d60593 100644 --- a/utils/documentation_tests.txt +++ b/utils/documentation_tests.txt @@ -91,6 +91,7 @@ src/transformers/models/pegasus/modeling_pegasus.py src/transformers/models/perceiver/modeling_perceiver.py src/transformers/models/plbart/modeling_plbart.py src/transformers/models/poolformer/modeling_poolformer.py +src/transformers/models/realm/configuration_realm.py src/transformers/models/reformer/configuration_reformer.py src/transformers/models/reformer/modeling_reformer.py src/transformers/models/regnet/modeling_regnet.py