[s2s] multigpu skip
Author: stas00
Pull request: yes

I have a hard time remembering whether this test worked on multi-gpu or not, it currently fails there, but work on a single gpu. So putting a band-aid `require_torch_non_multi_gpu_but_fix_me` skip for now, unless someone wants to work on it. For some reason I thought it was fine - I think it used to be fine.

The error:

```
CUDA_VISIBLE_DEVICES=0,1 RUN_SLOW=1 pyt test_finetune_trainer.py::TestFinetuneTrainer::test_finetune_bert2bert
...

test_finetune_trainer.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../src/transformers/trainer.py:774: in train
    self._maybe_log_save_evaluate(tr_loss, model, trial, epoch)
../../src/transformers/trainer.py:838: in _maybe_log_save_evaluate
    metrics = self.evaluate()
../../src/transformers/trainer.py:1241: in evaluate
    output = self.prediction_loop(
../../src/transformers/trainer.py:1343: in prediction_loop
    loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only)
seq2seq_trainer.py:188: in prediction_step
    generated_tokens = model.generate(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = DataParallel(
  (module): EncoderDecoderModel(
    (encoder): BertModel(
      (embeddings): BertEmbeddings(
        (...)
          )
          (decoder): Linear(in_features=128, out_features=30522, bias=True)
        )
      )
    )
  )
)
name = 'generate'

    def __getattr__(self, name: str) -> Union[Tensor, 'Module']:
        if '_parameters' in self.__dict__:
            _parameters = self.__dict__['_parameters']
            if name in _parameters:
                return _parameters[name]
        if '_buffers' in self.__dict__:
            _buffers = self.__dict__['_buffers']
            if name in _buffers:
                return _buffers[name]
        if '_modules' in self.__dict__:
            modules = self.__dict__['_modules']
            if name in modules:
                return modules[name]
>       raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
            type(self).__name__, name))
E       torch.nn.modules.module.ModuleAttributeError: 'DataParallel' object has no attribute 'generate'

/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/torch/nn/modules/module.py:795: ModuleAttributeError
```

@patrickvonplaten, @LysandreJik 

Comments:
Hi
I am getting this issue during eval on multiple gpus, is there a temporary fix I could run the codes on multiple gpus? thanks 

Fixed in https://github.com/huggingface/transformers/pull/8716

Hi
could you tell me in which version it is fixed?
thanks
Rabeeh

On Sun, Nov 22, 2020 at 8:45 PM Stas Bekman <notifications@github.com>
wrote:

> Fixed in #8716 <https://github.com/huggingface/transformers/pull/8716>
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/8613#issuecomment-731844378>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABP4ZCFX4OKJX7X3LFZJQFLSRFZ5DANCNFSM4TZSIEOQ>
> .
>


I just made a PR, so until it's accepted you need to apply the change yourself or use the PR branch - it's a 2-line change:
https://github.com/huggingface/transformers/pull/8716/files

Hi
this does not resolve the issue, could you please have a look at my
response here

https://github.com/huggingface/transformers/issues/7146

thanks
Rabeeh

On Sun, Nov 22, 2020 at 8:48 PM Stas Bekman <notifications@github.com>
wrote:

> I just made a PR, so until it's accepted you need to apply the change
> yourself or use the PR branch - it's a 2-line change:
> https://github.com/huggingface/transformers/pull/8716/files
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/8613#issuecomment-731844857>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABP4ZCGGZT4AE7ABEX5UGPTSRF2I7ANCNFSM4TZSIEOQ>
> .
>


That's a totally different issue. Please kindly file a new issue about it.

Also when you link to a comment, please click on the [...] in the right upper corner of the comment and get the link to that comment. Otherwise you're linking to the whole PR/issue and there is no telling what you're talking about. Hope this makes sense.

Also please use code formatting for backtraces as "code" using the menu. 

Finally, you need to fully follow the Issue template and provide full information on how the issue can be reproduced. Giving just the backtrace most of the time doesn't help the developer to know how to reproduce the problem and thus solve it.

Hi Stas
thank you, sure
Best
Rabeeh

On Sun, Nov 22, 2020 at 9:13 PM Stas Bekman <notifications@github.com>
wrote:

> That's a totally different issue. Please kindly file a new issue about it.
>
> Also when you link to a comment, please click on the [...] in the right
> upper corner of the comment and get the link to that comment. Otherwise
> you're linking to the whole PR/issue and there is no telling what you're
> talking about. Hope this makes sense.
>
> Also please use code formatting for backtraces as "code" using the menu.
>
> Finally, you need to fully follow the Issue template and provide full
> information on how the issue can be reproduced. Giving just the backtrace
> most of the time doesn't help the developer to know how to reproduce the
> problem and thus solve it.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/pull/8613#issuecomment-731848044>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABP4ZCGAOXRH7KU6RL3TIDDSRF5ILANCNFSM4TZSIEOQ>
> .
>