# EvaluatorServer

class `openff.evaluator.server.``EvaluatorServer`(calculation_backend, storage_backend=None, port=8000, working_directory='working-data')

  The object responsible for coordinating all properties estimations to be ran using the openff-evaluator framework.

  This server is responsible for receiving estimation requests from the client, determining which calculation layer to use to launch the request, and distributing that estimation across the available compute resources.

  Notes

  Every client request is split into logical chunk batches. This enables batches of related properties (e.g. all properties for CO) to be estimated in one go (or one task graph in the case of workflow based layers) and returned when ready, rather than waiting for the full data set to complete.

  Examples

  Setting up a general server instance using a dask based calculation backend, and a local file storage backend:

      >>> # Create the backend which will be responsible for distributing the calculations
      >>> from openff.evaluator.backends.dask import DaskLocalCluster
      >>> calculation_backend = DaskLocalCluster()
      >>> calculation_backend.start()
      >>>
      >>> # Create the server to which all estimation requests will be submitted
      >>> from openff.evaluator.server import EvaluatorServer
      >>> property_server = EvaluatorServer(calculation_backend)
      >>>
      >>> # Instruct the server to listen for incoming requests
      >>> # This command will run until killed.
      >>> property_server.start()

  `__init__`(calculation_backend, storage_backend=None, port=8000, working_directory='working-data')

    Constructs a new EvaluatorServer object.

    Parameters

      - calculation_backend (CalculationBackend) – The backend to use for executing calculations.

      - storage_backend (StorageBackend , optional) – The backend to use for storing information from any calculations. If None, a default LocalFileStorage backend will be used.

      - port (int) – The port on which to listen for incoming client requests.

      - working_directory (str) – The local directory in which to store all local, temporary calculation data.

  Methods

  `__init__`(calculation_backend[, …]) | Constructs a new EvaluatorServer object.
  `start`([asynchronous]) | Instructs the server to begin listening for incoming requests from any EvaluatorClients.
  `stop`() | Stops the property calculation server and it’s provided backend.

  `start`(asynchronous=False)

    Instructs the server to begin listening for incoming requests from any EvaluatorClients.

    Parameters

      asynchronous (bool) – If True the server will run on a separate thread in the background, returning control back to the main thread. Otherwise, this function will block the main thread until this server is killed.

  `stop`()

    Stops the property calculation server and it’s provided backend.