noamaanMulla-03/transformers-issues huggingface dataset:
Remove redundant line in run_pl_glue.py
Author: xujiaze13
Pull request: yes


Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=h1) Report
> Merging [#6305](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/118ecfd4273b5381aeeb65476a01678c7a96ae3e&el=desc) will **increase** coverage by `0.57%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6305/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6305      +/-   ##
==========================================
+ Coverage   78.15%   78.72%   +0.57%     
==========================================
  Files         148      148              
  Lines       27193    27193              
==========================================
+ Hits        21252    21407     +155     
+ Misses       5941     5786     -155     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `71.84% <0.00%> (-22.88%)` | :arrow_down: |
| [src/transformers/tokenization\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdHJhbnNmb194bC5weQ==) | `33.56% <0.00%> (-8.93%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.18% <0.00%> (-0.26%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.46% <0.00%> (+2.25%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6305/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `94.63% <0.00%> (+70.08%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=footer). Last update [118ecfd...31ae60c](https://codecov.io/gh/huggingface/transformers/pull/6305?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Thanks for contributing!
default `n_tpu_cores` in lightning_base.py
Author: xujiaze13
Pull request: yes

The original default `n_tpu_cores` value `0` raise Error
``pytorch_lightning.utilities.exceptions.MisconfigurationException: `tpu_cores` can only be 1, 8 or [<1-8>]``
And it should be corrected as `None`.

Comments:
fixed on master, let me know if not.
Redundant code
Author: xujiaze13
Pull request: no
Labels: name: Help wanted

https://github.com/huggingface/transformers/blob/2f2aa0c89cab9a77560e6845578f917a61081c67/examples/text-classification/run_pl_glue.py#L57

This line is useless

Comments:
Great catch! Feel free to PR a fix!
Failing XLMModelTest
Author: sshleifer
Pull request: no

https://github.com/huggingface/transformers/runs/929962952?check_suite_focus=true

FAILED tests/test_modeling_xlm.py::XLMModelTest::test_inputs_embeds - RuntimeError


Failure introduced somewhere in here:
```
* d951c14a Sylvain Gugger: Model output test (#6155) -   (8 hours ago)
* 86caab1e Sylvain Gugger: Harmonize both Trainers API (#6157) -   (8 hours ago)
* 603cd81a Mehrdad Farahani: readme m3hrdadfi/albert-fa-base-v2 (#6153) -   (11 hours ago)
* 838dc06f Suraj Patil: parse arguments from dict (#4869) -   (13 hours ago)
* cf3cf304 Paul O'Leary McCann: Replace mecab-python3 with fugashi for Japanese tokenization (#6086) -   (13 hours ago)
* f250beb8 Stas Bekman: enable easy checkout switch (#5645) -   (13 hours ago)
* 7d50af4b kolk: Create README.md (#6169) -   (13 hours ago)
* 0034a1d2 Prajjwal Bhargava: Add Pytorch Native AMP support in Trainer (#6151) -   (13 hours ago)
* 7231f7b5 Funtowicz Morgan: Enable ONNX/ONNXRuntime optimizations through converter script (#6131) -   (14 hours ago)
* c0b93a1c Stas Bekman: correct the correction (#6163) -   (23 hours ago)
* a2f6d521 Stas Bekman: typos (#6162) -   (24 hours ago)
* f3065abd Sylvain Gugger: Doc tokenizer (#6110) -   (26 hours ago)
* e642c789 guillaume-be: Addition of a DialoguePipeline (#5516) -   (27 hours ago)
* ec026747 Lysandre Debut: Fix FlauBERT GPU test (#6142) -   (30 hours ago)
* 91cb9546 Sylvain Gugger: Switch from return_tuple to return_dict (#6138) -   (32 hours ago)
* 562b6369 Sylvain Gugger: Tf trainer cleanup (#6143) -   (32 hours ago)
* c127d055 Oren Amsalem: add another e.g. to avoid confusion (#6055) -   (32 hours ago)
* d24ea708 Oren Amsalem: Actually the extra_id are from 0-99 and not from 1-100 (#5967) -   (35 hours ago)
* 3212b885 Stas Bekman: [s2s] add support for overriding config params (#6149) -   (2 days ago)
* 54f9fbef Julien Plu: Rework TF trainer (#6038) -   (2 days ago)
* 3f94170a Lysandre Debut: [WIP] Test TF Flaubert + Add {XLM, Flaubert}{TokenClassification, MultipleC… (#5614) -   (2 days ago)
* 8a8ae276 Sylvain Gugger: Use google style to document properties (#6130) -   (2 days ago)
* fc64559c Julien Plu: Fix TF CTRL model naming (#6134) -   (2 days ago)
* 641b873c Lysandre Debut: XLNet PLM Readme (#6121) -   (2 days ago)
* 8d157c93 Timo Moeller: add deepset/xlm-roberta-large-squad2 model card (#6128) -   (2 days ago)
* 6c002853 Funtowicz Morgan: Added capability to quantize a model while exporting through ONNX. (#6089) -   (2 days ago)
* 25de74cc Sylvain Gugger: Use FutureWarning to deprecate (#6111) -   (3 days ago)
* 640550fc Funtowicz Morgan: ONNX documentation (#5992) -   (3 days ago)
```


Any idea on this @sgugger or @LysandreJik  ? Otherwise I'll dig in.

Comments:
Unable to make inference from hosted api for a pretrained model that I uploaded. 
Author: JME-P
Pull request: no

I have successfully managed to upload a model (https://huggingface.co/shrugging-grace/tweetclassifier) via the transformers cli. I am also able to generate inferences from a local Jupyter notebook to that model.

However, when I go on the https://huggingface.co/shrugging-grace/tweetclassifier, it comes up with the following error when I try to make an inference:

_"Can't load config for 'shrugging-grace/tweetclassifier'. Make sure that: - 'shrugging-grace/tweetclassifier' is a correct model identifier listed on 'https://huggingface.co/models' - or 'shrugging-grace/tweetclassifier' is the correct path to a directory containing a config.json file"_

However:
- shrugging-grace/tweetclassifier seems to be the correct model identifier, and
- the JSON file seems to be present (https://s3.amazonaws.com/models.huggingface.co/bert/shrugging-grace/tweetclassifier/config.json) and working correctly when I make the inference from my local machine. 

Please could someone assist me in understanding how to get the hosted api (on https://huggingface.co/shrugging-grace/tweetclassifier) to work correctly ? Potentially one for: @LysandreJik  


Comments:
Fixed now. 

https://huggingface.co/shrugging-grace/tweetclassifier?text=I+like+you.+I+love+you

You should add a label map to get the correct labels displayed in the widget.

Thanks!

Thank you! Really appreciate the help and prompt response.
fix consistency CrossEntropyLoss in modeling_bart
Author: idoh
Pull request: yes

Other modeling architectures (`modeling_*.py`) use `CrossEntropyLoss` and not `F.cross_entropy`.
Fixed this consistency in `modeling_bart.py`.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=h1) Report
> Merging [#6265](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d9149f00d1a4650bafa7e1cd73e10398193c852c&el=desc) will **decrease** coverage by `0.14%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6265/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6265      +/-   ##
==========================================
- Coverage   78.45%   78.31%   -0.15%     
==========================================
  Files         146      146              
  Lines       26595    26596       +1     
==========================================
- Hits        20866    20829      -37     
- Misses       5729     5767      +38     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6265/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `95.76% <100.00%> (+<0.01%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6265/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.40% <0.00%> (-34.39%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6265/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `80.30% <0.00%> (+0.25%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6265/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.19% <0.00%> (+63.97%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=footer). Last update [d9149f0...ad31ee8](https://codecov.io/gh/huggingface/transformers/pull/6265?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Update Model Card
Author: binny-mathew
Pull request: yes
Labels: name: model card

Added citation and paper links.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=h1) Report
> Merging [#6252](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d9149f00d1a4650bafa7e1cd73e10398193c852c&el=desc) will **increase** coverage by `1.12%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6252/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6252      +/-   ##
==========================================
+ Coverage   78.45%   79.57%   +1.12%     
==========================================
  Files         146      146              
  Lines       26595    26595              
==========================================
+ Hits        20866    21164     +298     
+ Misses       5729     5431     -298     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6252/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `68.14% <0.00%> (-25.67%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6252/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `71.87% <0.00%> (-23.44%)` | :arrow_down: |
| [src/transformers/tokenization\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/6252/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxuZXQucHk=) | `66.66% <0.00%> (-23.43%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6252/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `96.75% <0.00%> (+73.16%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=footer). Last update [d9149f0...8c0b1e3](https://codecov.io/gh/huggingface/transformers/pull/6252?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Update Model Card
Author: binny-mathew
Pull request: yes
Labels: name: model card

Added citation and paper links.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=h1) Report
> Merging [#6250](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d9149f00d1a4650bafa7e1cd73e10398193c852c&el=desc) will **increase** coverage by `0.58%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6250/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6250      +/-   ##
==========================================
+ Coverage   78.45%   79.04%   +0.58%     
==========================================
  Files         146      146              
  Lines       26595    26595              
==========================================
+ Hits        20866    21022     +156     
+ Misses       5729     5573     -156     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6250/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |
| [src/transformers/tokenization\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/6250/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fbWFyaWFuLnB5) | `68.14% <0.00%> (-25.67%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6250/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `71.87% <0.00%> (-23.44%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6250/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `96.75% <0.00%> (+73.16%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=footer). Last update [d9149f0...19eb81b](https://codecov.io/gh/huggingface/transformers/pull/6250?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Update Model Card
Author: binny-mathew
Pull request: yes
Labels: name: model card

Added citation and paper links.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=h1) Report
> Merging [#6249](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/d9149f00d1a4650bafa7e1cd73e10398193c852c&el=desc) will **decrease** coverage by `0.52%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/6249/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #6249      +/-   ##
==========================================
- Coverage   78.45%   77.93%   -0.53%     
==========================================
  Files         146      146              
  Lines       26595    26595              
==========================================
- Hits        20866    20727     -139     
- Misses       5729     5868     +139     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/6249/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25feGxtLnB5) | `16.26% <0.00%> (-66.67%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/6249/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `71.87% <0.00%> (-23.44%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6249/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `80.30% <0.00%> (+0.25%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_flaubert.py](https://codecov.io/gh/huggingface/transformers/pull/6249/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9mbGF1YmVydC5weQ==) | `88.19% <0.00%> (+63.97%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=footer). Last update [d9149f0...d83e81b](https://codecov.io/gh/huggingface/transformers/pull/6249?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Hi , I am having trouble locating the transformers/examples/summarization/bart/ file. I was wondering if it has been renamed or changed?
Author: mc2259
Pull request: no

# ❓ Questions & Help

<!-- The GitHub issue tracker is primarly intended for bugs, feature requests,
     new models and benchmarks, and migration questions. For all other questions,
     we direct you to the Hugging Face forum: https://discuss.huggingface.co/ .
     You can also try Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. In this case, make sure to tag your
     question with the right deep learning framework as well as the
     huggingface-transformers tag: 
     https://stackoverflow.com/questions/tagged/huggingface-transformers 
     -->

## Details
<!-- Description of your issue -->

<!-- You should first ask your question on the forum or SO, and only if
     you didn't get an answer ask it here on GitHub. -->
**A link to original question on the forum/Stack Overflow**:

Comments:
Think it was moved to the seq2seq directory: https://github.com/huggingface/transformers/tree/master/examples/seq2seq

Thanks!
AttributeError: 'BertForPreTraining' object has no attribute 'global_step'
Author: MuruganR96
Pull request: no

@thomwolf  sir, i am also same issue (https://github.com/huggingface/pytorch-pretrained-BERT/issues/50#issuecomment-440624216). it doen't resolve. how i am convert my finetuned pretrained model to pytorch?

```
export BERT_BASE_DIR=/home/dell/backup/NWP/bert-base-uncased/bert_tensorflow_e100

pytorch_pretrained_bert convert_tf_checkpoint_to_pytorch \
  $BERT_BASE_DIR/model.ckpt-100 \
  $BERT_BASE_DIR/bert_config.json \
  $BERT_BASE_DIR/pytorch_model.bin

```

```
Traceback (most recent call last):
  File "/home/dell/Downloads/Downloads/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/dell/Downloads/Downloads/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/dell/backup/bert_env/lib/python3.6/site-packages/pytorch_pretrained_bert/__main__.py", line 19, in <module>
    convert_tf_checkpoint_to_pytorch(TF_CHECKPOINT, TF_CONFIG, PYTORCH_DUMP_OUTPUT)
  File "/home/dell/backup/bert_env/lib/python3.6/site-packages/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py", line 69, in convert_tf_checkpoint_to_pytorch
    pointer = getattr(pointer, l[0])
  File "/home/dell/backup/bert_env/lib/python3.6/site-packages/torch/nn/modules/module.py", line 535, in __getattr__
    type(self).__name__, name))
AttributeError: 'BertForPreTraining' object has no attribute 'global_step'
```
sir how to resolve this issue?
thanks.


Comments:
I have the same issue

Did you find any solution?


I have the same issue too
Error trying to import SquadDataset
Author: brian8128
Pull request: no

## Environment info

- `transformers` version: 3.0.2
- Platform: Linux-4.15.0-108-generic-x86_64-with-glibc2.10
- Python version: 3.8.2
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): not installed (NA)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help
@sgugger @julien-c 
 
## Information

I am trying to follow the run_squad_trainer example. However I am unable to import the SquadDataset from transformers. I tried updating to 3.0.2 but got the same error. 
https://github.com/huggingface/transformers/blob/master/examples/question-answering/run_squad_trainer.py

```
from transformers import SquadDataset
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-6-13f8e9ce9352> in <module>
----> 1 from transformers import SquadDataset

ImportError: cannot import name 'SquadDataset' from 'transformers' (/home/brian/miniconda3/envs/ML38/lib/python3.8/site-packages/transformers/__init__.py)
```

## Expected behavior

Import runs without error. 

Comments:
Hi @brian8128 , `SquadDataset` was added after the 3.0.2 release. You'll need to install from source to use it

Thanks! It's working now. You guys have written some code around this stuff!