noamaanMulla-03/transformers-issues huggingface dataset:
Hello,I have this problem in running 'run_glue.py'!
Author: BCWang93
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 -->
hello ,I have this problem in running 'run_glue.py'.Anyone can help me ?Thanks!
from transformers import glue_compute_metrics
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'glue_compute_metrics' from 'transformers' (/home/wangbingchen/wangbingchen/anaconda3/lib/python3.7/site-packages/transformers/__init__.py)

<!-- 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 Stack Overflow**:

Comments:
Hi @BCWang93, I had the same issue, you need to have scikit-learn installed to run 'run_glue.py'.

`pip install scikit-learn` solved the issue for me.

Indeed, this issue happens when `scikit-learn` is not installed. Thanks @nassim-yagoub!
There are some warnings when I used AdamW and pytorch1.5.
Author: ghost
Pull request: no
Labels: name: wontfix

# 🐛 Bug

## Information
pytorch/torch/csrc/utils/python_arg_parser.cpp:756: UserWarning: This overload of add_ is deprecated:
        add_(Number alpha, Tensor other)
Consider using one of the following signatures instead:
        add_(Tensor other, *, Number alpha)


Comments:
same here

This is not a bug but because pytorch 1.5 displays warnings that it didn't displayed before.

It may be this file https://github.com/huggingface/transformers/blob/master/src/transformers/optimization.py#L96

You can modify the code on those `add`, `addcdiv`, `addcmul` and use `alpha` or `value` keyword argument to eliminate these warnings. (or maybe submit a PR if that works!)

See pytorch doc: https://pytorch.org/docs/stable/torch.html#torch.add

pytorch/pytorch#32861

Hi is anyone submitting any PR for this issue?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
MBART: support summarization tasks where max_src_len > max_tgt_len
Author: sshleifer
Pull request: yes

Previously, MBartTokenizer.prepare_translation_batch always truncated `src_texts` and `tgt_texts` to the same length.
This PR exposes a `max_target_length` kwarg, which, if specified, will control truncation of target_texts.

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

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

```diff
@@           Coverage Diff           @@
##           master    #6003   +/-   ##
=======================================
  Coverage   78.52%   78.53%           
=======================================
  Files         146      146           
  Lines       26314    26316    +2     
=======================================
+ Hits        20664    20667    +3     
+ Misses       5650     5649    -1     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6003?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/6003/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `95.71% <100.00%> (+0.12%)` | :arrow_up: |
| [src/transformers/generation\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6003/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3V0aWxzLnB5) | `97.11% <0.00%> (+0.28%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6003?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/6003?src=pr&el=footer). Last update [d1d15d6...6c95793](https://codecov.io/gh/huggingface/transformers/pull/6003?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


we have a good test for `MbartDataset` I'll add a test for just the tokenizer to `tokenization_mbart.py`
Add inference widget examples
Author: clmnt
Pull request: yes


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

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

```diff
@@            Coverage Diff             @@
##           master    #5825      +/-   ##
==========================================
+ Coverage   78.10%   78.50%   +0.39%     
==========================================
  Files         146      146              
  Lines       26047    26047              
==========================================
+ Hits        20344    20448     +104     
+ Misses       5703     5599     -104     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/5825?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/5825/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9yb2JlcnRhLnB5) | `43.98% <0.00%> (-49.38%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/5825/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `86.21% <0.00%> (+0.25%)` | :arrow_up: |
| [src/transformers/modeling\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5825/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19vcGVuYWkucHk=) | `82.31% <0.00%> (+1.28%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_openai.py](https://codecov.io/gh/huggingface/transformers/pull/5825/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9vcGVuYWkucHk=) | `95.18% <0.00%> (+74.91%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/5825?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/5825?src=pr&el=footer). Last update [d088d74...682478c](https://codecov.io/gh/huggingface/transformers/pull/5825?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Create README.md
Author: mrm8488
Pull request: yes
Labels: name: model card


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

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

```diff
@@            Coverage Diff             @@
##           master    #6076      +/-   ##
==========================================
- Coverage   78.59%   77.37%   -1.22%     
==========================================
  Files         146      146              
  Lines       26314    26314              
==========================================
- Hits        20681    20361     -320     
- Misses       5633     5953     +320     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6076?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6076/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `23.38% <0.00%> (-73.39%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6076/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `84.96% <0.00%> (-1.26%)` | :arrow_down: |
| [src/transformers/file\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6076/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9maWxlX3V0aWxzLnB5) | `82.20% <0.00%> (-0.29%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6076/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9yb2JlcnRhLnB5) | `93.36% <0.00%> (+49.37%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6076?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/6076?src=pr&el=footer). Last update [9d0d3a6...45cc428](https://codecov.io/gh/huggingface/transformers/pull/6076?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Fix #6092
Author: sgugger
Pull request: yes

`BatchEncoding` are not instances of dictionaries so we need the separate test.

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

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

```diff
@@            Coverage Diff             @@
##           master    #6093      +/-   ##
==========================================
- Coverage   78.62%   77.42%   -1.21%     
==========================================
  Files         146      146              
  Lines       26324    26325       +1     
==========================================
- Hits        20698    20381     -317     
- Misses       5626     5944     +318     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/data/data\_collator.py](https://codecov.io/gh/huggingface/transformers/pull/6093/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9kYXRhL2RhdGFfY29sbGF0b3IucHk=) | `97.41% <100.00%> (+0.02%)` | :arrow_up: |
| [src/transformers/modeling\_tf\_mobilebert.py](https://codecov.io/gh/huggingface/transformers/pull/6093/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9tb2JpbGViZXJ0LnB5) | `23.38% <0.00%> (-73.39%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6093/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `85.21% <0.00%> (-1.01%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/6093/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9yb2JlcnRhLnB5) | `93.36% <0.00%> (+49.37%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6093?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/6093?src=pr&el=footer). Last update [54f49af...6fe884d](https://codecov.io/gh/huggingface/transformers/pull/6093?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
i dont know what Tranier`s Dataset is.
Author: Ted8000
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 -->
![image](https://user-images.githubusercontent.com/32102558/88669501-8ccdba80-d116-11ea-8b29-8dda1a61ce42.png)
![image](https://user-images.githubusercontent.com/32102558/88669549-9bb46d00-d116-11ea-840c-ff661b0a2b0d.png)
 i thought its my customer dataset goes wrong, i dont konw what dataset it should return. the Trainer receive what dataset.
<!-- 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:
Can reproduce, it should be fixed by #6093. Thanks for flagging!
create model-card for lordtt13/emo-mobilebert
Author: lordtt13
Pull request: yes
Labels: name: model card


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

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

```diff
@@            Coverage Diff             @@
##           master    #6030      +/-   ##
==========================================
+ Coverage   78.50%   78.64%   +0.14%     
==========================================
  Files         146      146              
  Lines       26249    26249              
==========================================
+ Hits        20606    20643      +37     
+ Misses       5643     5606      -37     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/6030?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_distilbert.py](https://codecov.io/gh/huggingface/transformers/pull/6030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9kaXN0aWxiZXJ0LnB5) | `64.90% <0.00%> (-33.90%)` | :arrow_down: |
| [src/transformers/generation\_tf\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/6030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9nZW5lcmF0aW9uX3RmX3V0aWxzLnB5) | `83.20% <0.00%> (-2.26%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_electra.py](https://codecov.io/gh/huggingface/transformers/pull/6030/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9lbGVjdHJhLnB5) | `95.53% <0.00%> (+69.51%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/6030?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/6030?src=pr&el=footer). Last update [c69ea5e...fa74b6b](https://codecov.io/gh/huggingface/transformers/pull/6030?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Interesting project, thanks for sharing. **[Model page](https://huggingface.co/lordtt13/emo-mobilebert)**
How can I check the loss during pretraing huggingface/transformers
Author: YuBeomGon
Pull request: no
Labels: name: trainer


 thanks in advance.
I trained roberta model from scratch.
But I cant  check the training loss during pretraining.
I did it by refering below link.
https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/01_how_to_train.ipynb
in above link, loss is printed every 500 steps,
but when I did, there is no loss print.


Iteration: 100%|█████████▉| 20703/20711 [4:42:54<00:07,  1.14it/s][A

Iteration: 100%|█████████▉| 20704/20711 [4:42:54<00:05,  1.24it/s][A

Iteration: 100%|█████████▉| 20705/20711 [4:42:55<00:05,  1.20it/s][A

Iteration: 100%|█████████▉| 20706/20711 [4:42:56<00:04,  1.18it/s][A

Iteration: 100%|█████████▉| 20707/20711 [4:42:57<00:03,  1.19it/s][A

Iteration: 100%|█████████▉| 20708/20711 [4:42:58<00:02,  1.16it/s][A

Iteration: 100%|█████████▉| 20709/20711 [4:42:59<00:01,  1.14it/s][A

Iteration: 100%|█████████▉| 20710/20711 [4:43:00<00:00,  1.13it/s][A

Iteration: 100%|██████████| 20711/20711 [4:43:00<00:00,  1.45it/s][A
Iteration: 100%|██████████| 20711/20711 [4:43:00<00:00,  1.22it/s]

Epoch: 100%|██████████| 13/13 [61:14:16<00:00, 16952.06s/it]  
Epoch: 100%|██████████| 13/13 [61:14:16<00:00, 16958.16s/it]
compress roberta.20200717.zip on ./pretrained
save roberta.20200717.zip on minio(petcharts)


stackoverflow link
https://stackoverflow.com/questions/62988081/checking-pretraining-loss-in-huggingface-transformers

Comments:
training loss should be printed every 500 iteration, but there is no log in pretraing.
(parser.add_argument("--logsteps", help="logging steps", type=int, default=500)

Hi! This wasn't intentional, so we've fixed it with #6097. If you rerun the script, you should see the losses now.
allenai/longformer-large-4096 unavailable
Author: CMobley7
Pull request: no

For some reason, I'm unable to download allenai/longformer-large-4096. Everything was working an hour ago, but all of a sudden I get the error included below. It's still listed on https://huggingface.co/models?search=allenai%2Flongformer-large-4096. I'm not sure what's up. Any ideas?
```
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 242, in get_config_dict
    raise EnvironmentError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/ptcc/run_glue.py", line 246, in <module>
    main()
  File "/ptcc/run_glue.py", line 123, in main
    cache_dir=model_args.cache_dir,
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_auto.py", line 203, in from_pretrained
    config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 251, in get_config_dict
    raise EnvironmentError(msg)
OSError: Can't load config for 'allenai/longformer-large-4096'. Make sure that:

- 'allenai/longformer-large-4096' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'allenai/longformer-large-4096' is the correct path to a directory containing a config.json file


Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 242, in get_config_dict
    raise EnvironmentError
OSError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/ptcc/run_glue.py", line 246, in <module>
    main()
  File "/ptcc/run_glue.py", line 123, in main
    cache_dir=model_args.cache_dir,
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_auto.py", line 203, in from_pretrained
    config_dict, _ = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 251, in get_config_dict
    raise EnvironmentError(msg)
OSError: Can't load config for 'allenai/longformer-large-4096'. Make sure that:

- 'allenai/longformer-large-4096' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'allenai/longformer-large-4096' is the correct path to a directory containing a config.json file
```

Comments:
The issue seems to have resolved itself. So, I'm closing the issue.