diff --git a/src/tiledb/cloud/soma/mapper.py b/src/tiledb/cloud/soma/mapper.py index f7c6e7486..6fb2e99ee 100644 --- a/src/tiledb/cloud/soma/mapper.py +++ b/src/tiledb/cloud/soma/mapper.py @@ -2,6 +2,7 @@ from typing import Any, Callable, Dict, Optional, Sequence, Tuple import anndata as ad +import tiledb import tiledbsoma from tiledb.cloud import dag @@ -233,8 +234,19 @@ def build_collection_mapper_workflow_graph( "Retrieving SOMA Experiment URIs from SOMACollection %s" % soma_collection_uri ) - with tiledbsoma.Collection.open(soma_collection_uri) as soco: - soma_experiment_uris = {k: v.uri for k, v in soco.items()} + + # Alternative: + # + # with tiledbsoma.Collection.open(soma_collection_uri) as soco: + # soma_experiment_uris = {k: v.uri for k, v in soco.items()} + # + # -- however, that opens all the members sequentially, and we don't need + # that overhead here in the launcher node. + # + # See also + # https://github.com/single-cell-data/TileDB-SOMA/issues/2787 + with tiledb.Group(soma_collection_uri) as grp: + soma_experiment_uris = {mbr.name: mbr.uri for mbr in grp} if experiment_names is not None: logger.info("Filtering SOMA Experiment URIs for specified names")