Monitoring and implementation of a multimodal end-to-end machine learning system, demonstrated through a Document-Question-Answering model.
Python
0
1 commits
updated Sep 20, 2024
This project contains monitoring a multimodal end-to-end machine learning system, demonstrated through a Document-Question-Answering model. It includes the development, containerization, and deployment of of an easily expandable machine learning system utilizing an online inference approach, providing a foundation for future exploration and evaluation of additional ML models. The monitoring system is implemented using Prometheus and Grafana to track performance and system metrics.
For easy access, a Gradio frontend is employed, which is served via an NGINX web server infront of a Gunicorn WSGI server. MongoDB is used for the historization of feature, model and text data and MinIO for the storage of image data. For monitoring, a comprehensive approach is taken by utilizing system, resource, model, input, and output-specific metrics. These metrics are collected and visualized with Prometheus and Grafana, providing insights into the system's performance and reliability in real time.
From the official microsoft wsl documentation: You can install everything you need to run WSL with a single command. Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator", enter the following command, then restart your machine.
wsl --install
This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux by default.
Download Docker Desktop from the offical Docker Desktop Website. After launching Docker Desktop, ensure that Ubuntu is enabled by navigating to Settings > Resources > WSL Integration.
docker-compose up
The first download of the docker images may take a while.
After the download is complete, the system will start and the terminal will notify you with [*] Backend: Backend ready when the initialisation is complete.
Hint: Gunicorn is configured with 4 Worker-Instances, which defines the maximum of parallel workflows (see Gunicorn Documentation for more details).
Four worker instances are adequate for a testing and development environment, but should be increased to meet higher demands. You can adjust this by modifying the parameter following -w in the docker-compose.yml:
command: gunicorn -w 4 -b 0.0.0.0:5000 --timeout 1200 backend:app
http://prometheus:9090 as the Prometheus server URL.MT-MMMS\monitoring\grafana of this repository. Make sure to select your previously configured prometheus data source before you click Import. Repeat this for each dashboard of your choice.frontend.py:
backend.py:
model/layoutlmv3.py
database.py or metrics.py as well as the model-inference itself.database.py:
initialize_mongodb() function. Each ML-Model module can call desired database-functions in order to store data during the inference process.metrics.py:
System:
Monitoring:
Grafana Dasboards used:
Monitoring and implementation of a multimodal end-to-end machine learning system, demonstrated through a Document-Question-Answering model.
Python
0
1 commits
updated Sep 20, 2024
This project contains monitoring a multimodal end-to-end machine learning system, demonstrated through a Document-Question-Answering model. It includes the development, containerization, and deployment of of an easily expandable machine learning system utilizing an online inference approach, providing a foundation for future exploration and evaluation of additional ML models. The monitoring system is implemented using Prometheus and Grafana to track performance and system metrics.
For easy access, a Gradio frontend is employed, which is served via an NGINX web server infront of a Gunicorn WSGI server. MongoDB is used for the historization of feature, model and text data and MinIO for the storage of image data. For monitoring, a comprehensive approach is taken by utilizing system, resource, model, input, and output-specific metrics. These metrics are collected and visualized with Prometheus and Grafana, providing insights into the system's performance and reliability in real time.
From the official microsoft wsl documentation: You can install everything you need to run WSL with a single command. Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting "Run as administrator", enter the following command, then restart your machine.
wsl --install
This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux by default.
Download Docker Desktop from the offical Docker Desktop Website. After launching Docker Desktop, ensure that Ubuntu is enabled by navigating to Settings > Resources > WSL Integration.
docker-compose up
The first download of the docker images may take a while.
After the download is complete, the system will start and the terminal will notify you with [*] Backend: Backend ready when the initialisation is complete.
Hint: Gunicorn is configured with 4 Worker-Instances, which defines the maximum of parallel workflows (see Gunicorn Documentation for more details).
Four worker instances are adequate for a testing and development environment, but should be increased to meet higher demands. You can adjust this by modifying the parameter following -w in the docker-compose.yml:
command: gunicorn -w 4 -b 0.0.0.0:5000 --timeout 1200 backend:app
http://prometheus:9090 as the Prometheus server URL.MT-MMMS\monitoring\grafana of this repository. Make sure to select your previously configured prometheus data source before you click Import. Repeat this for each dashboard of your choice.frontend.py:
backend.py:
model/layoutlmv3.py
database.py or metrics.py as well as the model-inference itself.database.py:
initialize_mongodb() function. Each ML-Model module can call desired database-functions in order to store data during the inference process.metrics.py:
System:
Monitoring:
Grafana Dasboards used: