Skip to content

Conversation

@sasha-scale
Copy link
Contributor

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.

@sasha-scale sasha-scale requested a review from Nastia39 October 19, 2020 15:48
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):
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

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):
Copy link
Contributor

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.

@Nastia39 Nastia39 merged commit c280f81 into master Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants