AML Dashboard: Sending Data to the Context Broker new Tutorial

AML Dashboard: Sending Data to the Context Broker new Tutorial

We are excited to introduce a new tutorial that guides users through sending data to the Context Broker using the AML Dashboard. This web-based tool enables seamless interaction with the AML framework, allowing users to efficiently upload data, create Fiware Nodes, and retrieve inference results.

This step-by-step guide will teach you how to set up the necessary components, send image data to the Context Broker, and obtain inference solutions. Additionally, we provide troubleshooting tips and insights into upcoming features, such as workload distribution for MNIST binary classification.

Read the full tutorial below and start exploring the capabilities of the AML Dashboard today

 

Background

The AML Dashboard is a web-based tool that allows users to interact with the AML framework.

This tutorial guides you through sending data to the Context Broker and retrieving inferences using the AML Dashboard.

../../_images/context_broker_dashboard.png

Prerequisites

Ensure you have installed the AML Dashboard using one of the following methods:

Check the AML Dashboard Interfaces and AML Dashboard Usage sections for more information.

Running the demo

To run the necessary components for interacting with the Context Broker using the AML Dashboard, follow these steps:

Start the backend server

To begin, you need to launch the backend server:

  1. Navigate to the backend directory.

cd backend

  1. Load the AML-IP environment.

source /AML-IP/install/setup.bash

  1. Start the server:

python3 server.py

Start the AML Dashboard

Once the backend server is running, start the AML Dashboard frontend:

  1. Navigate to the frontend/aml_dashboard directory.

cd frontend/aml_dashboard

  1. Start the AML Dashboard:

npm run dev

  1. Access the dashboard at http://localhost:5173/.

Start the Context Broker

To start the Context Broker, follow the instructions in this document.

Send data to the Context Broker

Create a Fiware Node

To create a Fiware Node, follow these steps:

  1. In the AML Dashboard, go to the Context Broker tab.
  2. Specify the necessary parameters for the Fiware Node creation, including the Context Broker entity ID and attributes.
  3. Click on the Create button in the Fiware Node.
  4. Once the node is successfully created, the Fiware Node Status will update to Created !.

Upload data

To send data to the Context Broker, follow these steps:

  1. Upload an image file from your computer by clicking on the Upload a file button and selecting an image.
  2. After uploading, click on the Post data button in the Context Broker Data to send the image to the Context Broker.
  3. Once the data is sent, the status will change to Sended ! in the Data Status.

Receive the solution

Start an Inference Node

  1. Navigate to the backend directory.

cd backend

  1. Load the AML-IP environment.

source /AML-IP/install/setup.bash

  1. Start the Inference Node:

python3 inference.py

Retrieve the solution

  1. The inference result (solution) will be displayed in the Context Broker Solution section.
  2. The Solution Status will change to Solution received ! to confirm that the inference has been successfully retrieved.

 

note.jpeg

Troubleshooting

If you encounter the following error when sending large files or data to the Context Broker:

requests.exceptions.HTTPError: 413 Client Error: Content Too Large for url: http://localhost:1026/v2/entities

This error indicates that the request payload is too large for the server to process. You may need to configure the Context Broker to accept larger payloads.

To address this issue, you can adjust the following flags in the Context Broker configuration:

  • inReqPayloadMaxSize: Increase this value to allow larger incoming request payloads.
  • outReqMsgMaxSize: Adjust this value to handle larger outgoing response messages.
  • logInfoPayloadMaxSize: Configure this flag to manage the size of payloads in log entries.
  • logLineMaxSize: Modify this value to accommodate longer lines in log files.

Set each flag according to the data size you need to handle.

Future work

Stay tuned for upcoming news!

We will soon upload a new tutorial on how to perform a Workload Distribution Scenario for MNIST Binary Classification with AML.

MORE INFORMATION ABOUT ALMA:

For any questions, please contact This email address is being protected from spambots. You need JavaScript enabled to view it..

 

By Denisa Alexandru from eProsima

Logo ALMA

The ALMA project leverages AML properties to develop a new generation of interactive, human-centered machine learning systems.

Coordinator Office Address

Plaza de la Encina 10-11, Núcleo 4, 2ª Pl.
28760 Tres cantos - Madrid (España)

  • X
  • LinkedIn

EN-Funded_by_the_EU-POSThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 952091.