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
error: casting &T
to &mut T
is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
--> tokenizers-lib/src/models/bpe/trainer.rs:517:47
#29576
Comments
Hi @dbl001, thanks for raising! What's the reason for trying to install v4.6 of transformers? This is almost 3 years old. I'd advise trying to use the most recent version Note: The version you'd want to install would be 4.6.1 - as we don't have |
I'm trying to run : Which calls for:
|
@dbl001 The pip install call there is installing a version of transformers which is a fork. If there's installation issues, you should raise it on that repo https://github.com/finetuneanon/transformers/ |
That's true, but it happens here as well:
|
@dbl001 Have you tried with a more recent transformers version? I'd try installing both the most recent transformers and tokenizers. |
Yes,
|
This is another reason why I tried to install a prior version:
It seems the project is just too old. |
@ther-0319 Not sure what you mean by 'the project', but yes, whatever is trying to import |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I'm having the same problem today. Not sure what to do. Tried installing the latest transformers manually also. |
@voxoid0 Could you provide a minimal code reproducer and information about the running environment? |
I am getting this error after
|
Hi @brand17, thanks for sharing. This looks like a rust issue and tokenizers issue, so not something we'd be able to address in transformers. Have you tried just install tokenizers directly: |
Hi, @amyeroberts. If I install
|
I can't figure this one out at all, though - none of those packages should introduce |
Today I tried launching the StableDiffusion Web UI and got the same error as it updated dependencies upon launching. On EdeavourOS, fully updated. SD was working perfectly yesterday. I tried replacing the EDIT: I solved the problem by using Python 3.10 instead of 3.12. |
System Info
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
On Google Colab trying to install transformers 4.0.6
I installed rust 1.76.0 which got: error: casting
&T
to&mut T
Then I tried rust 1.72.0 which was supposed to be less sensitive.
I tried with different versions of rust. rust 1.72.0 is supposed to work.
Expected behavior
Install transformers v4.06 on Google Colab.
The text was updated successfully, but these errors were encountered: