Skip to content

Add batch download tables - #331

Open
jamesz3ngsq wants to merge 6 commits into
SeequentEvo:mainfrom
jamesz3ngsq:jamesz3ngsq-add-batch-download-tables
Open

Add batch download tables#331
jamesz3ngsq wants to merge 6 commits into
SeequentEvo:mainfrom
jamesz3ngsq:jamesz3ngsq-add-batch-download-tables

Conversation

@jamesz3ngsq

Copy link
Copy Markdown

Description

This PR aims to address the slow download issue raised here.

For a Geoscience Object that contains many tables(i.e 100 tables) fetching that data using download_table is very slow as it will make a metadata request and fetch the object definition each time for every table to prepare the context for downloading. To address this, I've introduced a new method download_tables this will make a single metadata request to prepare the context for downloading, and the specified tables will be downloaded concurrently.

Checklist

  • [x ] I have read the contributing guide and the code of conduct

@jamesz3ngsq
jamesz3ngsq requested a review from a team as a code owner August 11, 2026 02:24
@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Add private helpers for preparing download contexts and loading a prepared table, then route single-table downloads through them.
Prepare all table download contexts with one metadata request, then load unique tables concurrently.
@jamesz3ngsq
jamesz3ngsq force-pushed the jamesz3ngsq-add-batch-download-tables branch from c3d68d0 to f5912b0 Compare August 11, 2026 04:02

@tim-hamblin-seequent tim-hamblin-seequent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments. I think this make sense to me after having a dig into it: you are leveraging the fact that prepare_data_download offers the ability to specify multiple data_identifiers and you are exposing it via download_tables. This seems all good to me, but it will need the check off from a maintainer.

Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
jamesz3ngsq and others added 2 commits August 13, 2026 13:01
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Let TaskGroup coordinate table download tasks and propagate failures while preserving bounded concurrency.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@peter-kipping-seequent peter-kipping-seequent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding some comments to the PR, however the main issue is actually that this approach isnt viable in 3.10, which we formally support on this SDK.
Taskground was introduced in 3.11, do you'll have to change the implementation of this to a 3.10 compatible concept.

Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
Comment thread packages/evo-objects/src/evo/objects/utils/data.py Outdated
downloads = await self._prepare_data_downloads(object_id, version_id, [data_id])
return await self._download_prepared_table(downloads[data_id], table_info, fb)

async def _prepare_data_downloads(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not the biggest fan on this function name, especially since its just shadowing the actual 'prepare_data_downloads' on a client.
However i cant really think of a better one right now.
If someone has a better suggestion im all ears, but what does 'prepare data downloads' mean?
Isnt it more like 'fetch list of downloads" or something?

Comment thread packages/evo-objects/src/evo/objects/utils/data.py
@jamesz3ngsq

Copy link
Copy Markdown
Author

Hey Peter, I've implemented your suggestions and used an async method compatible with 3.10. Cheers.

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.

4 participants