Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Failing Test]: pytorch_inference_it_test for MaskedLM is failing to load state dict #27734

Closed
1 of 15 tasks
riteshghorse opened this issue Jul 28, 2023 · 3 comments
Closed
1 of 15 tasks
Assignees
Labels
bug done & done Issue has been reviewed after it was closed for verification, followups, etc. failing test P2 permared python tests

Comments

@riteshghorse
Copy link
Contributor

riteshghorse commented Jul 28, 2023

What happened?

Looks like there is some problem with loading the state dict for BertForMaskedLM in this example with integration test.

      if len(error_msgs) > 0:
>           raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
                               self.__class__.__name__, "\n\t".join(error_msgs)))
�[1m�[31mE           RuntimeError: Error(s) in loading state_dict for BertForMaskedLM:�[0m
�[1m�[31mE           	Unexpected key(s) in state_dict: "bert.embeddings.position_ids".  [while running 'PyTorchRunInference/BeamML_RunInference']�

https://ci-beam.apache.org/job/beam_PostCommit_Python38_PR/755/consoleText

Issue Failure

Failure: Test is continually failing

Issue Priority

Priority: 2 (backlog / disabled test but we think the product is healthy)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@riteshghorse
Copy link
Contributor Author

I tried locally with the current state_dict_path apache-beam-ml/models/huggingface.BertForMaskedLM.bert-base-uncased.pth and it shows the same problem. Saved a new instance for the same model and it works fine.

I'm going to replace this file on GCS

@riteshghorse
Copy link
Contributor Author

@github-actions github-actions bot added this to the 2.50.0 Release milestone Jul 28, 2023
@riteshghorse
Copy link
Contributor Author

riteshghorse commented Jul 28, 2023

huggingface/transformers#24505 explains why the old saved file didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done & done Issue has been reviewed after it was closed for verification, followups, etc. failing test P2 permared python tests
Projects
None yet
Development

No branches or pull requests

2 participants