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

Adding huggingface generators for clrs text #135

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mcleish7
Copy link

@mcleish7 mcleish7 commented Jun 6, 2024

Adding Huggingface Datasets .from_generator support to allow for CLRS-Text datasets to be easily converted to huggingface format.

@mcleish7 mcleish7 marked this pull request as ready for review June 6, 2024 16:47
Copy link

@grenlayk grenlayk left a comment

Choose a reason for hiding this comment

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

Hello, thank you for your contribution! Apologies for the delay in reply.

In this iteration I added mostly general feedback about code structure and layout.

clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
mcleish7 and others added 2 commits June 26, 2024 18:45
Co-authored-by: Olga Kozlova <grenlaykk@gmail.com>
… instead of exactly equal sampling.

Added a use_hints field so data with and without hints can be identified per sample.
Copy link

@grenlayk grenlayk left a comment

Choose a reason for hiding this comment

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

Thank you for such a fast response!

I realized that I forgot to mention one significant point during the last iteration: we don't really need 2 separate generator functions, because they are almost identical, we can simply utilize different values for num_samples argument (i.e. set it to None or integer value).

Regarding the tests, I propose that I modify them myself and ask you to review them. Let me know what you think about it.

clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@RerRayne RerRayne left a comment

Choose a reason for hiding this comment

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

Hi Sean!
Thank you for amazing work you've done! I left 2 small comments to address. Thanks!

clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
clrs/_src/clrs_text/huggingface_generators.py Outdated Show resolved Hide resolved
@grenlayk
Copy link

grenlayk commented Jul 1, 2024

Jfyi I will add the test file tomorrow in the morning and ask both of you for the final review. Thanks!

@grenlayk
Copy link

grenlayk commented Jul 4, 2024

Morning all, I added test files to the brunch, please review. @RerRayne @mcleish7 Thanks!

I believe that once it's done, we are ready to submit. Thanks!

@mcleish7
Copy link
Author

mcleish7 commented Jul 4, 2024

"Pull request authors can’t approve their own pull request."
However, the new tests look great to me!

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