jina.drivers.reduce

class jina.drivers.reduce.ReduceAllDriver(traversal_paths=('c', ), *args, **kwargs)[source]

Bases: jina.drivers.BaseRecursiveDriver

ReduceAllDriver merges chunks/matches from all requests, recursively.

Note

It uses the last request as a reference.

Parameters

traversal_paths (Tuple[str]) – The describes the leaves of the document tree on which _apply_all are called

class jina.drivers.reduce.CollectEvaluationDriver(traversal_paths=('c', ), *args, **kwargs)[source]

Bases: jina.drivers.reduce.ReduceAllDriver

Merge all evaluations into one, grouped by doc.id

Parameters

traversal_paths (Tuple[str]) – The describes the leaves of the document tree on which _apply_all are called

class jina.drivers.reduce.ConcatEmbedDriver(traversal_paths=('c', ), *args, **kwargs)[source]

Bases: jina.drivers.reduce.ReduceAllDriver

Concat all embeddings into one, grouped by `doc.id`

Parameters

traversal_paths (Tuple[str]) – The describes the leaves of the document tree on which _apply_all are called