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

Update squad_convert_example_to_features to work with numpy v2 #35955

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jan 29, 2025

What does this PR do?

We get numpy==2.1.2 now instead of numpy==1.26.3 on our CircleCI runner env. (likely due to the torch==2.6 is out).
We need to use np.atleast_1 now for a scalar, as

span["input_ids"] == tokenizer.pad_token_id
is False in many case.

@ydshieh ydshieh changed the title We Update squad_convert_example_to_features to work with numpy v2 Jan 29, 2025
@ydshieh ydshieh requested a review from ArthurZucker January 29, 2025 11:14
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ydshieh ydshieh merged commit 692afa1 into main Jan 29, 2025
23 of 26 checks passed
@ydshieh ydshieh deleted the check_ec7afad_with_torch_26 branch January 29, 2025 13:33
ArthurZucker pushed a commit that referenced this pull request Jan 30, 2025
)

* Fix

* Fix

* Fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
bursteratom pushed a commit to bursteratom/transformers that referenced this pull request Feb 5, 2025
…gingface#35955)

* Fix

* Fix

* Fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
elvircrn pushed a commit to elvircrn/transformers that referenced this pull request Feb 13, 2025
…gingface#35955)

* Fix

* Fix

* Fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Feb 16, 2025
…gingface#35955)

* Fix

* Fix

* Fix

---------

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