-
Notifications
You must be signed in to change notification settings - Fork 11
Sasha/batching #11
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
Sasha/batching #11
Conversation
references/utils.py
Outdated
| items[i : i + batch_size] for i in range(0, len(items), batch_size) | ||
| ] | ||
| agg_response = UploadResponse(json={"dataset_id": dataset_id}) | ||
| for batch in tqdm.tqdm(batches): |
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.
Nastia, we had talked before about using two different versions of tqdm: one for command line and one for notebook. I tested the notebook use case by invoking the utils.py functions for an ipynb, and the standard tqdm renders fine. Take a look to double check this is the behavior you wanted, but my current view is that we should stick with just the basic version if it works.
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.
we still should use tqdm.notebook.tqdm: even though conventional tqdm.tqdm works the notebook version has better rendering in jupyter environment.
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.
I implemented this and WOW - you are right, so much better
references/utils.py
Outdated
| items[i : i + batch_size] for i in range(0, len(items), batch_size) | ||
| ] | ||
| agg_response = UploadResponse(json={"dataset_id": dataset_id}) | ||
| for batch in tqdm.tqdm(batches): |
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.
we still should use tqdm.notebook.tqdm: even though conventional tqdm.tqdm works the notebook version has better rendering in jupyter environment.
Added helper scripts in new references folder to give users an example for how to batch upload. The goal is to make it easier to debug uploading large payloads to Nucleus. Batching includes tqdm progress bar for feedback about estimated upload time.