-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Huggingface transformers #543
Huggingface transformers #543
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great @hfhoffman1144
One small issue though is that the linter is failing. For this one, it wants to reformat the notebook with black.
If you have black set up with notebook support (python -m pip install black[jupyter])
, you should be able to fix this by running black .
and committing the updated notebook.
Also, since there recently were some big updates in NumPy and Polars (https://realpython.com/python-news-july-2024/), it would be nice to doublecheck that out code still works with the latest versions of those libraries.
huggingface-transformers/README.md
Outdated
@@ -0,0 +1,24 @@ | |||
# Hugging Face Transformers: Leverage Open-Source AI in Python | |||
|
|||
This folder contains the materials for the tutorial (Hugging Face Transformers: Leverage Open-Source AI in Python)[https://realpython.com/huggingface-transformers-open-source-ai-in-python/]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update this link to match the shortened slug that we've switched the tutorial to:
This folder contains the materials for the tutorial (Hugging Face Transformers: Leverage Open-Source AI in Python)[https://realpython.com/huggingface-transformers-open-source-ai-in-python/]. | |
This folder contains the materials for the tutorial (Hugging Face Transformers: Leverage Open-Source AI in Python)[https://realpython.com/huggingface-transformers/]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
transformers==4.41.1 | ||
torch==2.2.0 | ||
accelerate==0.30.1 | ||
polars==0.20.31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polars just moved to v1.
If you have the time, it would be nice to switch to the latest Polars and just make sure everything still works as expected. If we pull in v1.1.0, that includes support for NumPy v2 as well, which adds another "challenge" it would be nice to see if we pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I upgraded to polars v1.1.0 and everything seems to work!
Materials for the tutorial: https://realpython.com/huggingface-transformers-open-source-ai-in-python/