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

Updated transformers 4.11.3 to --> 4.21.1 #54

Closed
wants to merge 1 commit into from

Conversation

atharvjairath
Copy link

Fix for issue:
#53
#40
Updated transformers 4.11.3 to --> 4.21.1 in Setup.py

@SamSamhuns
Copy link
Contributor

Updating the transformer library version will not solve the issue. If you install with pip install . using these changes, you will still face the ValueError: The following model_kwargs are not used by the model: ['encoder_outputs'] (note: typos in the generate arguments will also show up in this list) error.

Based on #53, I suggested locking the transformer version to transformers==4.21.1 as a temporary fix and not transformers>=4.21.1 in setup.py.

    ),
    python_requires=">=3.7",
    install_requires=[
-      "transformers>=4.11.3",
+      "transformers==4.21.1",
        "timm",
        "datasets[vision]",
        "pytorch-lightning>=1.6.4",

A new PR with modifications to the donut/model.py has been made at #56 to support newer transformer versions

@atharvjairath
Copy link
Author

A new PR with modifications to the donut/model.py has been made at #56 to support newer transformer versions

Great!

Updating the transformer library version will not solve the issue. If you install with pip install . using these changes, you will still face the ValueError: The following model_kwargs are not used by the model: ['encoder_outputs'] (note: typos in the generate arguments will also show up in this list) error.

For some reason, it works in my case, just updating the setup.py with transformers==4.21.1 and resetting the env.

@SamSamhuns
Copy link
Contributor

For some reason, it works in my case, just updating the setup.py with transformers==4.21.1 and resetting the env.

That's because you pinned the transformers version to 4.21.1 with == but in your commit, you have it as >=4.21.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants