scvi.dataloaders.ConcatDataLoader#
- class scvi.dataloaders.ConcatDataLoader(adata_manager, indices_list, shuffle=False, batch_size=128, data_and_attributes=None, drop_last=False, **data_loader_kwargs)[source]#
DataLoader that supports a list of list of indices to load.
- Parameters:
adata_manager (AnnDataManager) –
AnnDataManager
object that has been created viasetup_anndata
.indices_list (List[List[int]]) – List where each element is a list of indices in the adata to load
shuffle (bool) – Whether the data should be shuffled
batch_size (Optional[int]) – minibatch size to load each iteration
data_and_attributes (Optional[dict]) – Dictionary with keys representing keys in data registry (
adata_manager.data_registry
) and value equal to desired numpy loading type (later made into torch tensor). IfNone
, defaults to all registered data.data_loader_kwargs – Keyword arguments for
DataLoader
drop_last (bool) –
Attributes table#
Methods table#
Attributes#
multiprocessing_context
dataset
- ConcatDataLoader.dataset: Dataset[T_co]#
batch_size
num_workers
pin_memory
drop_last
timeout
sampler
- ConcatDataLoader.sampler: Union[Sampler, Iterable]#
pin_memory_device
prefetch_factor
Methods#
check_worker_number_rationality