get_dataloader_descr
get_dataloader_descr(dataloader, source='kipoi')
Get dataloder description
Arguments
- datalaoder: dataloader's relative path/name in the source. 2nd column in the
kipoi.list_dataloader()
pd.DataFrame`. - source: Model source. 1st column in the
kipoi.list_models()
pd.DataFrame
.
get_dataloader
get_dataloader(dataloader, source='kipoi')
Loads the dataloader
Arguments
- dataloader (str): dataloader name
- source (str): source name
Returns
- Instance of class inheriting from
kipoi.data.BaseDataLoader
(likekipoi.data.Dataset
) decorated with additional attributes.
Methods
- batch_iter(batch_size, num_workers, **kwargs)
- Arguments
- batch_size: batch size
- num_workers: Number of workers to use in parallel.
- **kwargs: Other kwargs specific to each dataloader
- Yields
dict
with"inputs"
,"targets"
and"metadata"
- Arguments
- batch_train_iter(cycle=True, **kwargs)
- Arguments
- cycle: if True, cycle indefinitely
- **kwargs: Kwargs passed to
batch_iter()
likebatch_size
- Yields
- tuple of ("inputs", "targets") from the usual dict returned by
batch_iter()
- tuple of ("inputs", "targets") from the usual dict returned by
- Arguments
- batch_predict_iter(**kwargs)
- Arguments
- **kwargs: Kwargs passed to
batch_iter()
likebatch_size
- **kwargs: Kwargs passed to
- Yields
- "inputs" field from the usual dict returned by
batch_iter()
- "inputs" field from the usual dict returned by
- Arguments
- load_all(**kwargs) - load the whole dataset into memory
- Arguments
- **kwargs: Kwargs passed to
batch_iter()
likebatch_size
- **kwargs: Kwargs passed to
- Returns
dict
with"inputs"
,"targets"
and"metadata"
- Arguments
- init_example() - instantiate the dataloader with example kwargs
- print_args() - print information about the required arguments
Appended attributes
- type (str): dataloader type (class name)
- defined_as (str): path and dataloader name
- args (list of kipoi.specs.DataLoaderArgument): datalaoder argument description
- info (kipoi.specs.Info): general information about the dataloader
- schema (kipoi.specs.DataloaderSchema): information about the input/output data modalities
- dependencies (kipoi.specs.Dependencies): class specifying the dependencies.
(implements
install
method for running the installation) - name (str): model name
- source (str): model source
- source_dir (str): local path to model source storage
- writers (dict): dictionary of arguments for writers
- example_kwargs (dict): kwargs for running the provided example