jina.drivers.reduce

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

Bases: jina.drivers.ContextAwareRecursiveMixin, jina.drivers.BaseRecursiveDriver

ReduceAllDriver merges chunks/matches from all requests, recursively.

Note

It uses the last request as a reference.

runtime: Optional[ZEDRuntime]
class jina.drivers.reduce.CollectEvaluationDriver(traversal_paths=('r'), *args, **kwargs)[source]

Bases: jina.drivers.FlatRecursiveMixin, jina.drivers.BaseRecursiveDriver

Merge all evaluations into one, grouped by doc.id

runtime: Optional[ZEDRuntime]
class jina.drivers.reduce.ConcatEmbedDriver(traversal_paths=('r'), *args, **kwargs)[source]

Bases: jina.drivers.BaseRecursiveDriver

Concat all embeddings into one, grouped by doc.id

Initialize a BaseRecursiveDriver

Parameters
  • traversal_paths (Tuple[str]) – Describes the leaves of the document tree on which _apply_all are called

  • args – additional positional arguments which are just used for the parent initialization

  • kwargs – additional key value arguments which are just used for the parent initialization

runtime: Optional[ZEDRuntime]