property app_name: str#

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

Return type


property is_enabled: bool#

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

Return type


property description: str#

Short description of the app.

Return type


property input_modality: now.constants.Modalities#

Modality used for running search queries

Return type


property output_modality: now.constants.Modalities#

Modality used for indexing data

Return type


property required_docker_memory_in_gb: int#

Recommended memory limit for the docker client to run this app.

Return type



Used to configure the flow yaml in the Jina NOW app. The interface is as follows: - if kwargs[‘finetuning’]=True, choose finetuning flow - if kwargs[‘encode’]=True, choose encoding flow (to get embeddings for finetuning) - temporarily introduced kwargs[‘dataset_len’], if app optimizes different flows to it

property supported_file_types: List[str]#

Used to filter files in local structure or an S3 bucket.

Return type


property index_query_access_paths: str#

Gives access paths for indexing and searching.

Return type


setup(dataset, user_input, kubectl_path)[source]#

Runs before the flow is deployed. Common use cases:

  • create a database

  • finetune a model + push the artifact

  • notify other services

  • check if starting the app is currently possible

  • dataset (DocumentArray) –

  • user_input (UserInput) – user configuration based on the given options

Return type



dict used to replace variables in flow yaml and to clean up resources after the flow is terminated

preprocess(da, user_input, is_indexing=False)[source]#

Loads and preprocesses every document such that it is ready for finetuning/indexing.

Return type


property bff_mapping_fns#

Apps usually have a custom input format and response which does not match the JinaRequestModel or JinaResponseModel. To create the mapping each Jina NOW app can implement the two bff mapping functions for each path - one for requests and one for responses


dictionary from path to a tuple of request model, response model,

request mapping fn and response mapping fn. By default, the mapping is the identity function and the request model and respond model are the default models. The path is a regex expression.

property max_request_size: int#

Max number of documents in one request

Return type

int, num_total_frames)[source]#[source]#