gnes.flow.base module

class gnes.flow.base.BaseIndexFlow(*args, **kwargs)[source]

Bases: gnes.flow.Flow

BaseIndexFlow defines a common service pipeline when indexing.

It can not be directly used as all services are using the base module by default. You have to use set() to change the yaml_path of each service.

train(bytes_gen=None, **kwargs)

Do training on the current flow

It will start a CLIClient and call train().

Parameters:
  • bytes_gen (Optional[Iterator[bytes]]) – An iterator of bytes. If not given, then you have to specify it in kwargs.
  • kwargs – accepts all keyword arguments of gnes client CLI
class gnes.flow.base.BaseQueryFlow(*args, **kwargs)[source]

Bases: gnes.flow.Flow

BaseIndexFlow defines a common service pipeline when indexing.

It can not be directly used as all services are using the base module by default. You have to use set() to change the yaml_path of each service.

train(bytes_gen=None, **kwargs)

Do training on the current flow

It will start a CLIClient and call train().

Parameters:
  • bytes_gen (Optional[Iterator[bytes]]) – An iterator of bytes. If not given, then you have to specify it in kwargs.
  • kwargs – accepts all keyword arguments of gnes client CLI