-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Hugging Face Loader: Add lazy load #4799
Conversation
@@ -72,13 +73,15 @@ def load(self) -> List[Document]: | |||
num_proc=self.num_proc, | |||
) | |||
|
|||
docs = [ | |||
yield from ( |
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 would be even better if we use streaming datasets https://huggingface.co/docs/datasets/stream
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.
if i understood correctly streaming=True
doesn't download the data locally, but streaming=False
does?
it sounds like we should pass a streaming
param to dataset, rather than use streaming=True
by default. Is that correct?
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.
Ya I don't think we should change the behavior right now
@vowelparrot I'm going to merge as is. My understanding is that adding a default |
Add lazy load to HF datasets loader
Unfortunately, there are no tests as far as i can tell. Verified code manually.