-
Notifications
You must be signed in to change notification settings - Fork 66
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
Update _BatchManager
to work with GlobalStep
s and input_batch_size
per step
#366
Update _BatchManager
to work with GlobalStep
s and input_batch_size
per step
#366
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.
Just a comment irrelevant to the nice PR
@@ -29,7 +29,7 @@ | |||
SaveFormats = Literal["json", "yaml"] | |||
|
|||
|
|||
def _get_class(module: str = None, name: str = None) -> Type: | |||
def _get_class(module: str, name: str) -> Type: |
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.
The default args are placed so here we can pass the data using **kwargs. But also, I see I have to update the code to use distilabel/pipeline/serialization
and remove this file. Will do that in a different PR.
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.
oops, my bad!
Description
This PR updates the
_BatchManager
to handle the creation of a "super" batch gathering all the data from the previous batches for theGlobalStep
s. In addition, it adds a new attribute to theStep
class calledinput_batch_size
. This argument can be used to define the desired number of rows that the step will receive per batch. Having that said, the_BatchManager
has also been updated to store the data of the output batches, instead of the batches itself. This allows to build batches of the desired size for each step.