now.app.search_app.app module#

class now.app.search_app.app.SearchApp[source]#

Bases: JinaNOWApp

property app_name: str#

Name of the app. Should be an enum value set in now.constants.Apps

Return type

str

property is_enabled: bool#

Set to True if this app is enabled for the end user.

Return type

bool

property description: str#

Short description of the app.

Return type

str

property required_docker_memory_in_gb: int#
Return type

int

property demo_datasets: Dict[TypeVar, List[DemoDataset]]#

Get a list of example datasets for the app.

Return type

Dict[TypeVar, List[DemoDataset]]

property finetune_datasets: [Tuple]#

Defines the list of demo datasets which are fine-tunable.

Return type

[Tuple]

is_demo_available(user_input)[source]#
Return type

bool

static autocomplete_stub(testing=False)[source]#
Return type

Dict

static preprocessor_stub(testing=False)[source]#
Return type

Dict

static clip_encoder_stub()[source]#
Return type

Tuple[Dict, int]

static sbert_encoder_stub()[source]#
Return type

Tuple[Dict, int]

static indexer_stub(user_input, encoder2dim, testing=False)[source]#

Creates indexer stub.

Parameters
  • user_input (UserInput) – user input

  • encoder2dim (Dict[str, int]) – maps encoder name to its output dimension

  • testing – use local executors if True

Return type

Dict

get_executor_stubs(user_input, testing=False, **kwargs)[source]#

Returns a dictionary of executors to be added in the flow

Parameters
  • user_input (UserInput) – user input

  • testing – use local executors if True

Return type

List[Dict]

Returns

executors stubs with filled-in env vars

property max_request_size: int#

Max number of documents in one request

Return type

int