monai.deploy.core.executors.Executor

class monai.deploy.core.executors.Executor(app, datastore=None, **kwargs)[source]

Bases: abc.ABC

This is the base class that enables execution of an application.

Constructor of the class.

Given an application it invokes the compose method on the app, which in turn creates the necessary operator and links them up.

Parameters
  • app (Application) – An application that needs to be executed.

  • datastore (Optional[Datastore]) – A data store that is used to store the data.

Methods

__init__(app[, datastore])

Constructor of the class.

run()

Run the app.

Attributes

app

Returns the application that is executed by the executor.

datastore

Returns the data store that is used to store the data.

__init__(app, datastore=None, **kwargs)[source]

Constructor of the class.

Given an application it invokes the compose method on the app, which in turn creates the necessary operator and links them up.

Parameters
  • app (Application) – An application that needs to be executed.

  • datastore (Optional[Datastore]) – A data store that is used to store the data.

property app: monai.deploy.core.application.Application

Returns the application that is executed by the executor.

Return type

Application

property datastore: monai.deploy.core.datastores.datastore.Datastore

Returns the data store that is used to store the data.

Return type

Datastore

abstract run()[source]

Run the app.

It is called to execute an application. This method needs to be implemented by specific concrete subclasses of Executor.