-
Notifications
You must be signed in to change notification settings - Fork 153
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
Add examples for HF datasets #1371
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/data/1371
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d906a44 with merge base aebad0c (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
examples/nodes/hf_datsets.py
Outdated
@@ -0,0 +1,82 @@ | |||
from datasets import Dataset # make sure that you have huggingface datasets installed | |||
|
|||
data = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]] |
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.
Along with an simple example like this, I wonder if it would add value to include an actual HF Dataset - maybe a text one?
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.
Yeah, that's my goal as well.
I am facing some fwdproxy issues with loading the datasets from huggingface.
I am trying to resolve that, after that I can include examples with more complex datasets.
examples/nodes/hf_datsets.py
Outdated
|
||
source_node = IterableWrapper(ds) | ||
|
||
print("==" * 20) |
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.
One thing I had in mind with /examples, we don't expect users to really run the code, but mostly use it as a reference implementation to port over their workflows. I wonder if we can write this file such that users can see all the relevant nodes linked together clearly?
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.
Yes, sure.
I will port these examples to a Jupyter notebook with print outputs in the file so it is easier to get the outputs.
Will also add some interleaved examples where we use multiple node functionalities together.
Adding examples for HF datasets with nodes.
Fixes #1352