Skip to content

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
Contributor

@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!

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
Contributor

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
Contributor

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 <[email protected]>

* fix

---------

Co-authored-by: ydshieh <[email protected]>
Co-authored-by: amyeroberts <[email protected]>
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.

4 participants