A Konduit Serving instance is configured by a Server object with a fully configured list of pipeline steps.

After the Server object is configured, you can use the .start() and .stop() methods to initialize and stop the Serving instance.

from konduit.server import Server
server = Server(

Configuring a Server object

There are two options for configuring a Server object:

Directly define a ServingConfig and a list of steps to Server

server = Server(
steps=[preprocessing_step, onnx_step]

Create an InferenceConfig object

inference_config = InferenceConfig(
steps=[preprocessing_step, onnx_step]
server = Server(

Configurations are stored as dictionaries. You can access a server's configuration as a Dictionary object using the server.config.as_dict() method.

Additional arguments

  • extra_start_args: Java Virtual Machine (JVM) arguments. In this case, -Xmx8g specifies that the maximum memory allocation for the JVM is 8GB.

  • config_path: path to write the config object to (as json)

  • jar_path: path to the konduit uberjar. If None, defaults to the KONDUIT_JAR_PATH environment variable, or ~/.konduit/konduit-serving if KONDUIT_JAR_PATH is not available.

  • pid_file_path: path to write the process ID to, as a text file.

  • start_timeout: time to wait for the server to timeout when starting the server instance.


For most configurations, the following arguments are sufficient:

  • http_port: HTTP port of the Konduit Serving instance.

  • listen_host: Host of the Konduit Serving instance. Defaults to 'localhost'.

  • input_data_format: Input data format: one of 'NUMPY', 'JSON', 'ND4J', 'IMAGE'or 'ARROW'. Defaults to NUMPY.

  • output_data_format: Output data format: one of 'NUMPY', 'JSON', 'ND4J', or 'ARROW'. Defaults to NUMPY.

The following arguments are optional:

  • prediction_type: Prediction type. This argument determines which "output adapter" is used to transform the output. Choose one of 'CLASSIFICATION', 'YOLO', 'SSD', 'RCNN', 'RAW', 'REGRESSION'. The default prediction type is 'RAW': that is, no adapter is applied to the output.

  • uploads_directory: Directory to store file uploads. Defaults to 'file-uploads/'.

  • log_timings: Whether to log timings for this config. Defaults to False

  • metric_types: The types of metrics logged for your ServingConfig can currently only be configured and extended from Java. Don't modify this property.


The start method initializes a Konduit Serving instance, and ends any previously started server that is still running. Set the kill_existing_server argument to False to change this behaviour.


The stop method ends the Konduit Serving process defined by the Server object.

YAML configuration

Refer to the YAML configuration page.