mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-30 18:38:13 +08:00
load embeddings in parallel (#1352)
* load embeddings in parallel * correctly capture unclipped * test * another test * add convenient copy assets target * cleanup
This commit is contained in:
@@ -331,10 +331,9 @@ class DataAdaptor(metaclass=ABCMeta):
|
||||
normalized_layout = normalized_layout.astype(dtype=np.float32)
|
||||
return normalized_layout
|
||||
|
||||
def layout_to_fbs_matrix(self):
|
||||
""" same as layout, except returns a flatbuffer """
|
||||
def layout_to_fbs_matrix(self, fields):
|
||||
"""
|
||||
return all embeddings as a flatbuffer, using the cellxgene matrix fbs encoding.
|
||||
return specified embeddings as a flatbuffer, using the cellxgene matrix fbs encoding.
|
||||
|
||||
* returns only first two dimensions, with name {ename}_0 and {ename}_1,
|
||||
where {ename} is the embedding name.
|
||||
@@ -343,8 +342,7 @@ class DataAdaptor(metaclass=ABCMeta):
|
||||
* does not support filtering
|
||||
|
||||
"""
|
||||
|
||||
embeddings = self.get_embedding_names()
|
||||
embeddings = self.get_embedding_names() if fields is None or len(fields) == 0 else fields
|
||||
layout_data = []
|
||||
with ServerTiming.time(f"layout.query"):
|
||||
for ename in embeddings:
|
||||
|
||||
Reference in New Issue
Block a user