Skip to content

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Aug 24, 2023

What does this PR do?

#25571 changed this test. There was a tiny issue. See my comment along the change in this PR.

We should probably to change this variable names in multiple places for house keeping.

Also cc @gante 😄


input_sentence = ["I enjoy walking with my cute dog", "I enjoy walking with my cute dog"]

input_ids = tokenizer.batch_encode_plus(input_sentence, return_tensors="pt", padding=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not actually ids

input_sentence = ["I enjoy walking with my cute dog", "I enjoy walking with my cute dog"]

input_ids = tokenizer.batch_encode_plus(input_sentence, return_tensors="pt", padding=True)
input_ids = input_ids["input_ids"].to(torch_device)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no ids


input_ids = tokenizer.batch_encode_plus(input_sentence, return_tensors="pt", padding=True)
input_ids = input_ids["input_ids"].to(torch_device)
attention_mask = input_ids["attention_mask"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no attention_mask in the actual ids

input_ids = tokenizer.batch_encode_plus(input_sentence, return_tensors="pt", padding=True)
input_ids = input_ids["input_ids"].to(torch_device)
attention_mask = input_ids["attention_mask"]
inputs = tokenizer.batch_encode_plus(input_sentence, return_tensors="pt", padding=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good name and avoid failure.

@ydshieh ydshieh requested a review from ArthurZucker August 24, 2023 08:57
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

😅 Nice catch !

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 24, 2023

😅 Nice catch !

I was caught by the failed CI 😢

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 24, 2023

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

@ydshieh ydshieh merged commit 8fff61b into main Aug 24, 2023
@ydshieh ydshieh deleted the fix_bloom_test branch August 24, 2023 09:15
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
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