Skip to content

WARNING:allennlp.models.model:Encountered the antecedent_indices key in the model's return dictionary which couldn't be split by the batch size. Key will be ignored. #2

Open

Description

@louiswng

Hi, I run your code to train the model on QA dataset using command python train_model.py --configuration configurations/qa.json. However, there is a WARNING bug when it begins as:

Building the train set (or loading from cache if possible): 4%| | 1965/43738 [00:09<04:01, WARNING:allennlp.models.model:Encountered the antecedent_indices key in the model's return dictionary which couldn't be split by the batch size. Key will be ignored.

And then, the Building the train set process have no response all the day.

Why is that? Can you help me with it?

My Environment:

  • Python 3
  • PyTorch 1.7.1
  • PyTorch Geometric 1.7.2
  • AllenNLP 0.9.0
  • SpaCy 2.1.9

Activity

  1. MichSchli commented on Sep 15, 2021

    @MichSchli
    Owner

    Hi, that sounds quite strange. I haven't been able to replicate this behaviour. This error originates from the AllenNLP coreference resolver. Would you please try with PyTorch 1.8.1 to ensure that we have the same versions, and verify that you do have the right version of AllenNLP (the model only works with 0.9.0)?

  2. louiswng commented on Sep 23, 2021

    @louiswng
    Author

    I am sure the version of AllenNLP in my environment is 0.9.0, and I will try the pytorch version you mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions