jaclearn.dataflow package

Submodules

jaclearn.dataflow.batch module

class jaclearn.dataflow.batch.BatchDataFlow(source, batch_size, sample_dict, filler=<function batch_default_filler>)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

class jaclearn.dataflow.batch.EpochDataFlow(source, epoch_size)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

jaclearn.dataflow.collections module

class jaclearn.dataflow.collections.RandomIndexDataFlow(source, nr_repeat=1, seed=None)[source]

Bases: jaclearn.dataflow.dataflow.RandomizedDataFlowBase

class jaclearn.dataflow.collections.DictDataFlowProxy(keys, iterable)[source]

Bases: jaclearn.dataflow.dataflow.ProxyDataFlowBase

class jaclearn.dataflow.collections.EmptyDictDataFlow[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

class jaclearn.dataflow.collections.QueueDataFlow(queue)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

class jaclearn.dataflow.collections.PoolDataFlow(pool)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

class jaclearn.dataflow.collections.ListOfArrayDataFlow(loa)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

jaclearn.dataflow.collections.DictOfArrayDataFlow(doa)[source]
class jaclearn.dataflow.collections.DictToBatchDataFlow(iterable, excludes=None)[source]

Bases: jaclearn.dataflow.dataflow.ProxyDataFlowBase

class jaclearn.dataflow.collections.KVStoreDataFlow(kv_getter)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

class jaclearn.dataflow.collections.KVStoreRandomSampleDataFlow(kv_getter, seed=None)[source]

Bases: jaclearn.dataflow.dataflow.RandomizedDataFlowBase

class jaclearn.dataflow.collections.PoolRandomSampleDataFlow(pool, seed=None)[source]

Bases: jaclearn.dataflow.dataflow.RandomizedDataFlowBase

class jaclearn.dataflow.collections.LOARandomSampleDataFlow(loa, seed=None)[source]

Bases: jaclearn.dataflow.dataflow.RandomizedDataFlowBase

jaclearn.dataflow.collections.DOARandomSampleDataFlow(doa, seed=None)[source]

jaclearn.dataflow.dataflow module

class jaclearn.dataflow.dataflow.DataFlowBase[source]

Bases: object

class jaclearn.dataflow.dataflow.SimpleDataFlowBase[source]

Bases: jaclearn.dataflow.dataflow.DataFlowBase

class jaclearn.dataflow.dataflow.ProxyDataFlowBase(other)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

unwrapped
class jaclearn.dataflow.dataflow.AdvancedDataFlowBase[source]

Bases: jaclearn.dataflow.dataflow.DataFlowBase

class jaclearn.dataflow.dataflow.RandomizedDataFlowBase(seed=None)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase

jaclearn.dataflow.utils module

jaclearn.dataflow.utils.cycle(iterable, times=None)[source]
jaclearn.dataflow.utils.cycle_n(iterable, times=None)
jaclearn.dataflow.utils.cached_cycle

alias of itertools.cycle

class jaclearn.dataflow.utils.repeat(object[, times]) → create an iterator which returns the object

Bases: object

for the specified number of times. If not specified, returns the object endlessly.

jaclearn.dataflow.utils.repeat_n

alias of itertools.repeat

class jaclearn.dataflow.utils.chain

Bases: object

chain(*iterables) –> chain object

Return a chain object whose .__next__() method returns elements from the first iterable until it is exhausted, then elements from the next iterable, until all of the iterables are exhausted.

from_iterable()

chain.from_iterable(iterable) –> chain object

Alternate chain() constructor taking a single iterable argument that evaluates lazily.

class jaclearn.dataflow.utils.takewhile

Bases: object

takewhile(predicate, iterable) –> takewhile object

Return successive entries from an iterable as long as the predicate evaluates to true for each entry.

class jaclearn.dataflow.utils.dropwhile

Bases: object

dropwhile(predicate, iterable) –> dropwhile object

Drop items from the iterable while predicate(item) is true. Afterwards, return every element until the iterable is exhausted.

class jaclearn.dataflow.utils.filter

Bases: object

filter(function or None, iterable) –> filter object

Return an iterator yielding those items of iterable for which function(item) is true. If function is None, return the items that are true.

jaclearn.dataflow.utils.filtertrue

alias of builtins.filter

class jaclearn.dataflow.utils.filterfalse

Bases: object

filterfalse(function or None, sequence) –> filterfalse object

Return those items of sequence for which function(item) is false. If function is None, return the items that are false.

class jaclearn.dataflow.utils.map

Bases: object

map(func, *iterables) –> map object

Make an iterator that computes the function using arguments from each of the iterables. Stops when the shortest iterable is exhausted.

class jaclearn.dataflow.utils.starmap

Bases: object

starmap(function, sequence) –> starmap object

Return an iterator whose values are returned from the function evaluated with an argument tuple taken from the given sequence.

jaclearn.dataflow.utils.ssmap(function, iterable)[source]
class jaclearn.dataflow.utils.islice

Bases: object

islice(iterable, stop) –> islice object islice(iterable, start, stop[, step]) –> islice object

Return an iterator whose next() method returns selected values from an iterable. If start is specified, will skip all preceding elements; otherwise, start defaults to zero. Step defaults to one. If specified as another value, step determines how many values are skipped between successive calls. Works like a slice() on a list but returns an iterator.

jaclearn.dataflow.utils.truncate

alias of itertools.islice

jaclearn.dataflow.utils.tee()

tee(iterable, n=2) –> tuple of n independent iterators.

class jaclearn.dataflow.utils.MapDataFlow(other, map_func=None)[source]

Bases: jaclearn.dataflow.dataflow.ProxyDataFlowBase

class jaclearn.dataflow.utils.DataFlowMixer(dataflows, buflen=None)[source]

Bases: jaclearn.dataflow.dataflow.SimpleDataFlowBase