-
Notifications
You must be signed in to change notification settings - Fork 5
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
209 run in batches #228
base: main
Are you sure you want to change the base?
209 run in batches #228
Conversation
@@ -135,6 +135,55 @@ def run( | |||
return results[0] | |||
return results | |||
|
|||
def run_in_batches( | |||
self, fp: TextIO, batch_size: int |
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.
Instead of passing a file pointer, let's instead pass a Path or string and then create the file pointer in this method.
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.
gotcha will update
After discussing this feature with the group, it sounds like we should look into adding a parser for query files to prevent crashes from faulty files (See issue #236) |
Pull request for #209
Created a generator function that takes a file pointer and a batch size and reads up to that many queries from the file and calls run.