On running finetune.py for seq2seq, the following error comes up: optimizer_step() got an unexpected keyword argument 'using_native_amp'
File "finetune.py", line 344, in <module>
    main(args)
  File "finetune.py", line 322, in main
    logger=logger,
  File "/content/drive/My Drive/Colab Notebooks/transformers/examples/lightning_base.py", line 336, in generic_train
    trainer.fit(model)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/trainer.py", line 979, in fit
    self.single_gpu_train(model)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/distrib_parts.py", line 185, in single_gpu_train
    self.run_pretrain_routine(model)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/trainer.py", line 1156, in run_pretrain_routine
    self.train()
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/training_loop.py", line 370, in train
    self.run_training_epoch()
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/training_loop.py", line 452, in run_training_epoch
    batch_output = self.run_training_batch(batch, batch_idx)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/training_loop.py", line 657, in run_training_batch
    grad_norm_dic = self.run_batch_backward_pass(split_batch, batch_idx, opt_idx, optimizer)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/training_loop.py", line 709, in run_batch_backward_pass
    self.call_optimizer_step(optimizer, opt_idx, batch_idx, split_batch)
  File "/usr/local/lib/python3.6/dist-packages/pytorch_lightning/trainer/training_loop.py", line 747, in call_optimizer_step
    using_native_amp=native_amp)
TypeError: optimizer_step() got an unexpected keyword argument 'using_native_amp'

I am using pytorch-lightning==0.8.1.
Can I get some help. 
Thank you
Same issue here on 0.8.4. Downgrading to 0.8.1 works for me.

Related to recent pytorch-lightning commits for Apex: https://github.com/PyTorchLightning/pytorch-lightning/commit/0a092f66836912a714804c5103f03c7929ebf774<|||||>however wandb is not working with 0.8.1<|||||>Getting the same issue today with 0.8.4. Was working fine last week -- not sure what changed :-( -- will try to downgrade Lightning and see what happens.

Update: downgrading to Lightning 0.7.5 -- something is running (training now), but getting bunch of warnings as well. Any idea of the expected compatibility requirements @sshleifer ? Can also try 0.8.1 -- or take a look at any related issues.

I'm running HF Transformers from source, sync'ed today.<|||||>0.8.1 is the current version that I am running. @marton-avrios, wandb works for me in that version. Want to post a traceback in a new issue with your error?<|||||>@sshleifer 0.8.1 works well for me as well. And no warnings, like the older 0.7.x. Seems that 0.8.4 is what you get by default via `pip`. Hopefully that gets fixed on one end or the other, but 0.8.1 good for me. Should have replied sooner...<|||||>The reason it changed is because the overloaded `optimizer_step` does not include the new parameters.

This can be fixed in the demo scripts by adding the parameters to the overriding function.<|||||>> 0.8.1 is the current version that I am running. @marton-avrios, wandb works for me in that version. Want to post a traceback in a new issue with your error?

See #5739 <|||||>> The reason it changed is because the overloaded `optimizer_step` does not include the new parameters.
> 
> This can be fixed in the demo scripts by adding the parameters to the overriding function.

Thank you. This helped me out.<|||||>> > The reason it changed is because the overloaded `optimizer_step` does not include the new parameters.
> > This can be fixed in the demo scripts by adding the parameters to the overriding function.
> 
> Thank you. This helped me out.

How did you solve it?<|||||>> > > The reason it changed is because the overloaded `optimizer_step` does not include the new parameters.
> > > This can be fixed in the demo scripts by adding the parameters to the overriding function.
> > 
> > 
> > Thank you. This helped me out.
> 
> How did you solve it?

Are you facing this issue ?<|||||>I faced the same issue after upgrading to pytorch-lightning to 0.9.0. The solution above, adding parameters works. In my case using the huggingface lightning_base.py,
I add using_native_amp=None in `def optimizer_step(self, epoch, batch_idx, optimizer, optimizer_idx, second_order_closure=None,using_native_amp=None):`
<|||||>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.
