Skip to content

Commit

Permalink
[Doctest] Add configuration_bert.py to doctest (huggingface#19485)
Browse files Browse the repository at this point in the history
* BertConfig for doctest

* Change import order

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
2 people authored and amyeroberts committed Oct 18, 2022
1 parent 04135c8 commit 55bdd49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/models/bert/configuration_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ class BertConfig(PretrainedConfig):
Examples:
```python
>>> from transformers import BertModel, BertConfig
>>> from transformers import BertConfig, BertModel
>>> # Initializing a BERT bert-base-uncased style configuration
>>> configuration = BertConfig()
>>> # Initializing a model from the bert-base-uncased style configuration
>>> # Initializing a model (with random weights) from the bert-base-uncased style configuration
>>> model = BertModel(configuration)
>>> # Accessing the model configuration
Expand Down
1 change: 1 addition & 0 deletions utils/documentation_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ src/transformers/models/albert/modeling_albert.py
src/transformers/models/albert/modeling_tf_albert.py
src/transformers/models/bart/modeling_bart.py
src/transformers/models/beit/modeling_beit.py
src/transformers/models/bert/configuration_bert.py
src/transformers/models/bert/modeling_bert.py
src/transformers/models/bert/modeling_tf_bert.py
src/transformers/models/bigbird_pegasus/modeling_bigbird_pegasus.py
Expand Down

0 comments on commit 55bdd49

Please sign in to comment.