def stream(self, start_offset: int=0, shuffle: bool=False, skip_shuffle_at_epoch_end: bool=False, shuffle_seed: Optional[int]=None, shard_rank: int=0, num_shards: int=1, drop_shard_remainder: bool=False) -> yogadl.Stream:
    '\n        Create a stream from a cache.\n        '
    if (shuffle and (not skip_shuffle_at_epoch_end)):
        assert (shuffle_seed is not None), 'Please set `shuffle_seed` if enabling `shuffle` and not enabling `skip_shuffle_at_epoch_end`.'
    generated_keys = self._shard_keys(shard_rank=shard_rank, num_shards=num_shards, drop_shard_remainder=drop_shard_remainder)
    generator_from_keys = yogadl.GeneratorFromKeys(keys=generated_keys, initial_offset=start_offset, read_val_from_key_fn=self._lmdb_access.read_value_by_key, shuffle_at_start=shuffle, shuffle_after_epoch=(shuffle and (not skip_shuffle_at_epoch_end)), shuffle_seed=shuffle_seed)
    return yogadl.Stream(iterator_fn=generator_from_keys.instantiate_generator, length=len(generated_keys), output_types=self._lmdb_access.get_types(), output_shapes=self._lmdb_access.get_shapes())
Create a stream from a cache.
def stream(self, start_offset: int=0, shuffle: bool=False, skip_shuffle_at_epoch_end: bool=False, shuffle_seed: Optional[int]=None, shard_rank: int=0, num_shards: int=1, drop_shard_remainder: bool=False) -> yogadl.Stream:
    '\n        \n        '
    if (shuffle and (not skip_shuffle_at_epoch_end)):
        assert (shuffle_seed is not None), 'Please set `shuffle_seed` if enabling `shuffle` and not enabling `skip_shuffle_at_epoch_end`.'
    generated_keys = self._shard_keys(shard_rank=shard_rank, num_shards=num_shards, drop_shard_remainder=drop_shard_remainder)
    generator_from_keys = yogadl.GeneratorFromKeys(keys=generated_keys, initial_offset=start_offset, read_val_from_key_fn=self._lmdb_access.read_value_by_key, shuffle_at_start=shuffle, shuffle_after_epoch=(shuffle and (not skip_shuffle_at_epoch_end)), shuffle_seed=shuffle_seed)
    return yogadl.Stream(iterator_fn=generator_from_keys.instantiate_generator, length=len(generated_keys), output_types=self._lmdb_access.get_types(), output_shapes=self._lmdb_access.get_shapes())