Skip to content

Pytorch 1.5 DataParallel #3936

Closed
Closed
@Rizhiy

Description

@Rizhiy

🐛 Bug

Information

Can't run forward in PyTorch 1.5.0, works fine in 1.4.0

Model I am using (Bert, XLNet ...): XLNet

Language I am using the model on (English, Chinese ...): English

The problem arises when using:

  • the official example scripts: (give details below)
  • my own modified scripts: (give details below)

Transformer + custom head + custom losses + differential learning rates, I don't think it matters.

The tasks I am working on is:

  • an official GLUE/SQUaD task: (give the name)
  • my own task or dataset: (give details below)

Custom news classification

To reproduce

Steps to reproduce the behavior:

  1. Install PyTorch 1.5.0
  2. Run forward on xlnet
  File "transformers/modeling_xlnet.py", line 761, in forward
    dtype_float = next(self.parameters()).dtype
StopIteration

Expected behavior

Runs forward

Environment info

  • transformers version: 2.8.0
  • Platform: Ubuntu 18.04
  • Python version: Anaconda 3.7
  • PyTorch version (GPU?): 1.5, Yes
  • Tensorflow version (GPU?): N/A
  • Using GPU in script?: Yes
  • Using distributed or parallel set-up in script?: Yes

Metadata

Metadata

Assignees

Labels

PyTorchAnything PyTorch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions