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

Huggingface transformers #543

Merged
merged 11 commits into from
Jul 14, 2024

Conversation

hfhoffman1144
Copy link
Contributor

Copy link
Contributor

@gahjelle gahjelle left a 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.

@@ -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/].
Copy link
Contributor

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:

Suggested change
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/].

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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!

@brendaweles brendaweles merged commit c14b862 into realpython:master Jul 14, 2024
1 check passed
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.

None yet

3 participants