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

Add torch >=1.12 requirement for Tapas #24251

Merged
merged 6 commits into from
Jun 13, 2023
Merged

Add torch >=1.12 requirement for Tapas #24251

merged 6 commits into from
Jun 13, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 13, 2023

What does this PR do?

Tapas files are changed in #20149 to use torch's scatter. The torch tensor's method scatter_reduce accept the argument src only for torch >= 1.12.

This PR add some warnings/requirements in tapas modeling/test files to avoid test failures in past CI with torch <= 1.11.

(one previous similar PR is #19851)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 13, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

src/transformers/models/tapas/modeling_tapas.py Outdated Show resolved Hide resolved
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Comment on lines 536 to 539
@unittest.skipIf(
not is_torch_greater_or_equal_than_1_12,
reason="`GPTBigCode` checkpoints use `PytorchGELUTanh` which requires `torch>=1.12.0`."
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amyeroberts Just put this one to this PR to not opening a new PR. Sorry for doing this after PR being reviewed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, thanks for pinging me on the comment to highlight :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval still stands :)

@ydshieh ydshieh merged commit cf561d7 into main Jun 13, 2023
@ydshieh ydshieh deleted the fix_tapas_in_past_ci branch June 13, 2023 17:19
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
* fix

* fix

* fix

* Update src/transformers/models/tapas/modeling_tapas.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
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.

3 participants