Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Dec 21, 2022

What does this PR do?

Make Past CI (with torch 1.8) cleaner

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 21, 2022

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

@ydshieh ydshieh closed this Dec 21, 2022
@ydshieh ydshieh reopened this Dec 21, 2022
@ydshieh ydshieh changed the title 🔥 Leave Past CI failures in the past 🔥 [Past CI] 🔥 Leave Past CI failures in the past 🔥 Dec 21, 2022
candidate_score = candidate_score.view(-1, self.config.num_candidates, self.config.retriever_proj_size)
# [batch_size, num_candidates]
relevance_score = torch.einsum("BD,BND->BN", query_score, candidate_score)
relevance_score = torch.einsum("bd,bnd->bn", query_score, candidate_score)
Copy link
Collaborator Author

@ydshieh ydshieh Dec 21, 2022

Choose a reason for hiding this comment

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

torch 1.8 complains uppercase here

# move channels to last dimension, as the _build_network_inputs method below expects this
if inputs.ndim == 4:
inputs = torch.permute(inputs, (0, 2, 3, 1))
inputs = inputs.permute(0, 2, 3, 1)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

torch 1.8 has no torch.permute, but x.permute works

@ydshieh ydshieh marked this pull request as ready for review December 21, 2022 16:31
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 21, 2022

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

@ydshieh ydshieh requested review from LysandreJik and sgugger and removed request for sgugger December 21, 2022 16:49
Copy link
Collaborator

@sgugger sgugger 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 all the fixes!

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Fantastic @ydshieh, thank you for your work!

@ydshieh ydshieh merged commit 5fa0b17 into main Dec 27, 2022
@ydshieh ydshieh deleted the fix_past_ci_2 branch December 27, 2022 17:37
MKhalusova pushed a commit to MKhalusova/transformers that referenced this pull request Dec 28, 2022
* torch.jit._state

* Fix past CI

* Fix for perceiver

* Fix REALM

* Fix for Bloom

* Fix for SwinMode

* Fix for TrajectoryTransformerModel

* Fix for test_wav2vec2_with_lm

* make style

Co-authored-by: ydshieh <[email protected]>
@ydshieh ydshieh mentioned this pull request Jan 3, 2023
silverriver pushed a commit to silverriver/transformers that referenced this pull request Jan 6, 2023
* torch.jit._state

* Fix past CI

* Fix for perceiver

* Fix REALM

* Fix for Bloom

* Fix for SwinMode

* Fix for TrajectoryTransformerModel

* Fix for test_wav2vec2_with_lm

* make style

Co-authored-by: ydshieh <[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.

5 participants