noamaanMulla-03/transformers-issues huggingface dataset:
Fix beam search when sampling in language generation
Author: patrickvonplaten
Pull request: yes

I think there is a problem with beam search when setting `do_sample=True` 
As it was implemented before, the variable `next_words` in previous line 829 would always contains 
word ids < `vocab_size` which forces all `beam_idx` to always be == 0.
This way all words would actually always be appended to the `input_ids` of the first beam. 

In the proposed PR, the words are sampled over the scores of size `(batch_size, num_beams * vocab_size)`, which is similar to what is done in greedy decoding. 

I tried generating a couple of sequences with the proposed change and it seems to be important that the temperature is set relatively high (~1.5) to avoid repeating words. 

Not 100% whether the proposed PR is the best fix. In general, beam search seems to work better when doing greedy decoding.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/2317?src=pr&el=h1) Report
> Merging [#2317](https://codecov.io/gh/huggingface/transformers/pull/2317?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/aeef4823ab6099249679756182700e6800024c36?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `0%`.

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

```diff
@@           Coverage Diff           @@
##           master    #2317   +/-   ##
=======================================
  Coverage   73.49%   73.49%           
=======================================
  Files          87       87           
  Lines       14793    14793           
=======================================
  Hits        10872    10872           
  Misses       3921     3921
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/2317?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/2317/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `63.45% <0%> (ø)` | :arrow_up: |

------

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


Good point but we shouldn't be sampling like that indeed, we should be sampling independently for each beam.
Fine-tuning BertAbs on new dataset?
Author: ehsan-soe
Pull request: no
Labels: name: wontfix

## 🚀 Feature

Hi,
I wonder if there can be a script for fine-tuning BertAbs on new dataset?
Or if you have some hint to provide about this task? Not sure how to access loss from ```modeling_bertabs.py```.

Thanks




Comments:
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.


duplicate of #2597, no update yet sadly.
How to run bert without checkpoints
Author: calusbr
Pull request: no
Labels: name: wontfix

I would like to run BERT from scratch with no checkpoints for my language (PT-BR) and make a comparison with the multilingual model!

I am currently running BERT-Native provided by google to get checkpoints from scratch and then converting to pytorch. But it is a time consuming process!

can anybody help me?

Comments:
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.
BART -- RuntimeError: expected device cuda:0 but got device cpu
Author: adihaviv
Pull request: no
Labels: name: seq2seq

# 🐛 Bug
@sshleifer

I'm using BART model (bart-large), when I try to use the BartForMaskedLM i'm getting the above error. The reason is that in the _combine_masks (line 146 in modeling_bart) is creating a tensor without the device. so by default it is on CPU.  To reproduce - simply use BartForMaskedLM model with GPU. 
can you help? am I missing anything? 

Additional details: 
----------------------
- `transformers` version: 2.5.1
- Python version: 3.7.4
- PyTorch version (GPU?): 1.3.0 (with GPU)
- Using GPU in script?: yes
- Using distributed or parallel set-up in script?: no 



stuck trace:
File "/specific/netapp5_2/gamir/adi/git/BERTese/lama/training.py", line 151, in train_and_eval
    outputs = model(b_in_tensor, lm_labels=b_label_tensor)
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/transformers/modeling_bart.py", line 925, in forward
    decoder_cached_states=decoder_cached_states,
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/transformers/modeling_bart.py", line 844, in forward
    decoder_cached_states=decoder_cached_states,
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/transformers/modeling_bart.py", line 499, in forward
    need_attn_weights=self.output_attentions,
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/transformers/modeling_bart.py", line 372, in forward
    attn_mask=attention_mask,
  File "/specific/netapp5_2/gamir/adi/miniconda3/envs/trans_py37/lib/python3.7/site-packages/transformers/modeling_bart.py", line 629, in forward
    attn_weights = attn_weights.view(bsz, self.num_heads, tgt_len, src_len) + attn_mask
RuntimeError: expected device cuda:0 but got device cpu

Thanks,
Adi.

Comments:
Can you reproduce with the code on master?

```
git clone https://github.com/huggingface/transformers
cd transformers
pip install .
```
(duplicate of https://github.com/huggingface/transformers/issues/3079)


Closing for now, reopen if this is broken on the latest code. Otherwise, it will be in the next pip release. Thanks!
BART : host `bart-large-cnn`
Author: astariul
Pull request: no
Labels: name: New model

name: Core: Encoder-Decoder

name: seq2seq

# 🌟 New model addition

BART pretrained model `bart-large` is currently provided, as well as fine-tuned BART model `bart-large-mnli`.

**How about [`bart-large-cnn`](https://github.com/pytorch/fairseq/tree/master/examples/bart#pre-trained-models) ?**

Comments:
IIRC @sshleifer  is working on getting summarization working with that model.
Summarization Examples: add Bart CNN Evaluation
Author: sshleifer
Pull request: yes


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

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

```diff
@@           Coverage Diff            @@
##           master   #3082     +/-   ##
========================================
+ Coverage   77.19%   77.6%   +0.4%     
========================================
  Files          98      98             
  Lines       16063   16219    +156     
========================================
+ Hits        12400   12586    +186     
+ Misses       3663    3633     -30
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/3082?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/tokenization\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3082/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fYmFydC5weQ==) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/configuration\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3082/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9jb25maWd1cmF0aW9uX2JhcnQucHk=) | `100% <100%> (ø)` | :arrow_up: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/3082/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `92.76% <76.66%> (+0.38%)` | :arrow_up: |
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3082/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `93.05% <88.82%> (+8.47%)` | :arrow_up: |

------

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


![image](https://user-images.githubusercontent.com/6045025/75801403-16848200-5d49-11ea-8f61-2b822de050c2.png)
New organization @LysandreJik 

I like that organisation
BART BartForSequenceClassification example
Author: easonnie
Pull request: no
Labels: name: seq2seq

# 🐛 Bug
I'm trying the run the code on the documentation.
https://huggingface.co/transformers/model_doc/bart.html#bartforsequenceclassification

```
from transformers import BartTokenizer, BartForSequenceClassification
import torch

tokenizer = BartTokenizer.from_pretrained('bart-large')
model = BartForSequenceClassification.from_pretrained('bart-large')
input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute",
add_special_tokens=True)).unsqueeze(0)  # Batch size 1
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(input_ids, labels=labels)
loss, logits = outputs[:2]
```

output:
```
Traceback (most recent call last):
  File "/ssd-playpen/yixin1/projects/cleartheuncertainty/utest/utest_transformer/utest_bart.py", line 11, in <module>
    outputs = model(input_ids, labels=labels)
  File "/ssd-playpen/yixin1/projects/cleartheuncertainty/ENV/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/ssd-playpen/yixin1/projects/cleartheuncertainty/ENV/lib/python3.7/site-packages/transformers/modeling_bart.py", line 1327, in forward
    loss = F.cross_entropy(logits.view(-1, self.num_labels), labels.view(-1))
  File "/ssd-playpen/yixin1/projects/cleartheuncertainty/ENV/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in __getattr__
    type(self).__name__, name))
AttributeError: 'BartForSequenceClassification' object has no attribute 'num_labels'
```

I guess this should be a quick fix or so.


Comments:
Thanks for reporting this!
BartForSequenceClassification: fix num_labels, add test
Author: sshleifer
Pull request: yes


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

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

```diff
@@            Coverage Diff             @@
##           master    #3110      +/-   ##
==========================================
+ Coverage   77.83%   77.84%   +<.01%     
==========================================
  Files          98       98              
  Lines       16422    16422              
==========================================
+ Hits        12782    12783       +1     
+ Misses       3640     3639       -1
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/3110?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3110/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `93.38% <100%> (+0.33%)` | :arrow_up: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/3110/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `94.45% <0%> (-0.16%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/3110?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/3110?src=pr&el=footer). Last update [5c5af87...0893268](https://codecov.io/gh/huggingface/transformers/pull/3110?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
How can I finetune the BERTModel on my own corpus?
Author: Reply1999
Pull request: no
Labels: name: Ex: LM (Finetuning)

name: Core: Modeling

name: Usage

# ❓ 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 Stack Overflow (SO) where a whole community of PyTorch and
     Tensorflow enthusiast can help you out. 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 
     
     If your question wasn't answered after a period of time on Stack Overflow, you
     can always open a question on GitHub. You should then link to the SO question 
     that you posted.
     -->

## Details
<!-- Description of your issue -->
Thanks for your code!

I want to fine-tune the BERT model on my own corpus which has a smaller vocabulary than the default size of 30522, and my final goal is to obtain a fine-tuned and personalized BERT model which can provide proper word embedding for future top tasks. In short, I need to fine-tune the BERTModel for providing word embedding based on my own corpus.

How can I build a new vocabulary and then fetch the embeddings from the provided pre-trained model, e.g., bert-base-uncased, and then fine-tune the model on my own corpus?

Have you provided functions for building vocabulary and further fine-tuning?


Comments:
Take a look at the `resize_embeddings` function and  `examples/run_language_modeling.py`.

sorry, where is the resize_embeddings function?

My bad, it's a method on `PretrainedModel` called `resize_token_embeddings`. There is a call in `run_language_modeling.py.
Bart: Use bool attention_mask for encoder
Author: sshleifer
Pull request: yes

Wasn't breaking because bool(-1e4) is True, but clearer this way.

Comments:
I believe the `bool` operator was introduced in PyTorch 1.2.0, won't this break compatibility with PyTorch 1.0.0?

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

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

```diff
@@            Coverage Diff             @@
##           master    #3054      +/-   ##
==========================================
- Coverage    77.2%   77.18%   -0.02%     
==========================================
  Files          98       98              
  Lines       16063    16063              
==========================================
- Hits        12401    12399       -2     
- Misses       3662     3664       +2
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/3054?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_bart.py](https://codecov.io/gh/huggingface/transformers/pull/3054/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19iYXJ0LnB5) | `84.58% <100%> (ø)` | :arrow_up: |
| [src/transformers/modeling\_utils.py](https://codecov.io/gh/huggingface/transformers/pull/3054/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ191dGlscy5weQ==) | `92.22% <0%> (-0.33%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/3054?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/3054?src=pr&el=footer). Last update [8bcb37b...2116c2b](https://codecov.io/gh/huggingface/transformers/pull/3054?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
fix beam_search behavior when sampling
Author: patrickvonplaten
Pull request: yes

This PR aims to fix the beam search behavior when sampling for language generation.
For once, when doing beam_search decoding for language generation, one would usually do greedy decoding (do_sample=False), so this case should not be used very often, but it should be logical nevertheless. 

It's kind of hard to see what happens when doing beam_search decoding with sampling=True, so here a quick example. Running this code: 

```
from transformers import GPT2LMHeadModel, GPT2Tokenizer
model = GPT2LMHeadModel.from_pretrained('gpt2')
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
inputs_dict = tokenizer.encode_plus('The dog', return_tensors='pt')
outputs = model.generate(inputs_dict['input_ids'], num_beams=3, max_length=10)
```

and putting the following print statement: 
`print("Sorted hyps: {}".format([x[1] for x in sorted_hyps]))`
after line: https://github.com/huggingface/transformers/blob/a088d75e510d5641808ccd72f5dca4df36d95b8e/src/transformers/modeling_utils.py#L1087

would print the following beam hypothesis before this PR: 

```
# printed sorted_hyps from line: 1088
# Beam_idx: 1 - tensor([ 464, 3290,  635,  468,  257, 2041, 3895,  326,  481, 1037])
# Beam_idx: 2 - tensor([ 464, 3290,  635,  468,  257, 2041, 3895,  326,  481, 1037])
# Beam_idx: 3 - tensor([ 464, 3290,  635,  468,  257, 2041, 3895,  326,  481, 1037])

=> Result: best beam hypothesis: "The dog, named T.H., was recently"
```

It can be seen that they are all equal even the last word. And they will always be equal. The reason for this is that currently we sample only word_idx in the interval [0, vocab_size] 
(see https://github.com/huggingface/transformers/blob/a088d75e510d5641808ccd72f5dca4df36d95b8e/src/transformers/modeling_utils.py#L975) 

which forces that all beam_idx computed in this line: 
https://github.com/huggingface/transformers/blob/a088d75e510d5641808ccd72f5dca4df36d95b8e/src/transformers/modeling_utils.py#L1023 

always all equal 0. This means that we only consider the first (0-idx) beam and disregard all other beams no matter what. 

After this PR: we sample from `[0, num_beams * vocab_size]` (as it's done in greedy decoding so that the beam_idx can be in the range `[0, num_beams]` - as it should be). Same print statement would produce:

```
# printed sorted_hyps from line: 1088
# Beam_idx: 1 - tensor([ 464, 3290,  373,  788, 3888,  284,  257, 6716, 2156,  351])
# Beam_idx: 2 - tensor([ 464, 3290,  373,  788, 3888,  284,  257, 6716, 2156,  11])
# Beam_idx: 3 - tensor([ 464, 3290,  373,  788, 3888,  284,  257, 6716, 2156,  1566])

=> Result: best beam hypothesis: "The dog was then moved to a nearby house until"
```

I discussed with @thomwolf and think this is the best solution for beam_search sampling for language generation. 


Comments:
> is do_sample=True tested anywhere?

Yes for the randomly initialized models, with dummy input and also for some Integration tests

Good to merge for me
Adding Docker images for transformers + notebooks
Author: mfuntowicz
Pull request: yes

Docker images are as follow:

- transformers-cpu (PyTorch + TF)
- transformers-gpu (PyTorch + TF)
- transformers-pytorch-cpu
- transformers-pytorch-gpu
- transformers-tensorflow-cpu
- transformers-tensorflow-gpu

Images are tagged according to the version of the library they bring and always use the latest version of DL frameworks.

Notebooks introduce:

- How to use tokenizers
- Overall transformers overview
- How to use pipelines 

Currently notebooks are added to the repo, let's discuss internally if it's a good idea.

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/3051?src=pr&el=h1) Report
> Merging [#3051](https://codecov.io/gh/huggingface/transformers/pull/3051?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/53ce3854a16ad2a715bc6ac8af3e30c18b5a1d11?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@          Coverage Diff           @@
##           master   #3051   +/-   ##
======================================
  Coverage    76.1%   76.1%           
======================================
  Files          98      98           
  Lines       15946   15946           
======================================
  Hits        12136   12136           
  Misses       3810    3810
```



------

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


On the Docker files, do we really need conda? (I try to stay away from conda as much as possible)

Well, conda brings Intel MKL with just `conda install mkl, mkl-devel` which improves PyTorch and TF by a significant factor. 

Depending on what level of performances we want to provide: 

- I totally remove MKL and install some Open BLAS/LAPACK libraries
- I'll build MKL in the images and include into PATH

MKL is also available on PyPi. Have a looks-y [here](https://software.intel.com/en-us/articles/installing-the-intel-distribution-for-python-and-intel-performance-libraries-with-pip-and) to check whether everything you need is there. This might also be of interest: https://software.intel.com/en-us/distribution-for-python/choose-download/linux