monai.deploy.core.executors.SingleProcessExecutor

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

Bases: monai.deploy.core.executors.executor.Executor

This class implements execution of a MONAI App in a single process in environment.

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)

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

run()[source]

Run the app.

This method retrieves the root nodes of the graph traveres through the graph in a depth first approach. Retrieves output from an upstream operator at a particular output port. Sets the right input to a downstrem operator at the right input port. Executes the operators.