# BPMN modelling of the inference process

The current page provides a BPMN diagram, depicting the inference process of a machine learning model.

There are 4 main BPMN swim lanes, depicting:

1. "ML system input/API" (2nd lane) – the system asset, representing an interface, which receives user input, transfers it for preprocessing and for inference to the model.
2. "Enabling software components" (left middle lane) – represents the corresponding asset and the processes, which are undertaken with the asset. The components may include software frameworks, libraries, and runtime environments, utilized for model building, training and development.
3. "ML processing system" (right middle lane) - the high-level representation of the system, which interconnects separate system assets, dedicated to the building, training, operating and maintenance of the machine learning model.
4. "Processing hardware running the ML model" (bottom lane) – hardware, specialized accelerator systems, which execute the ML model’s inference operations.

An auxiliary top lane represents an end user, who jump-starts the training process. The lane does not correspond to any assets within the UML diagram, it is added to depict the starting point of the inference process with user submitting input data.

An end user starts the inference process of a machine learning model by submitting a query with input data through a set interface. Through enabling software components, the initial input query is preprocessed and returned to the input system. The input system transfers the preprocessed input data query to the ML processing system, which starts the execution of the deployed model. The ML processing system passes the deployed model and the preprocessed input query to the hardware processing system. The hardware processing system conducts the execution of required calculations with the deployed model against the preprocessed input query. In between execution cycles, operational data is produced and is stored. Finally, the inferences (output data) are produced, and they are returned through the system assets back to the end user. The end user conducts further operations on the received inferences, output data. Output data and the tasks related to its retrieval are auxiliary, depicted to form a complete loop, the data and tasks do not correspond to any business assets or method, defined in the main asset model - Asset class diagram.