3. Usage

3.1. Prerequisites

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

3.2. Execution

To run the AML Dashboard, follow the steps below:

3.2.1. Backend Server

Run the following commands to start the backend server:

  1. Navigate to the backend directory.

cd backend
  1. Start the server:

python3 server.py

3.2.2. AML-IP Nodes

Depending on your requirements, you can run different types of AML-IP nodes:

3.2.2.1. Manual Execution

  1. Load the AML-IP environment

source /AML-IP/install/setup.bash
  1. Navigate to the backend directory.

cd backend
  • Computing Node

To run a Computing Node, execute:

python3 computing.py

You can run multiple computing nodes simultaneously. Each computing node will continuously await job assignments. When running multiple nodes, they will collectively distribute the workload, optimizing the time to find a solution.

To stop a computing node, simply run ctrl+C.

  • Model Manager Sender Node

To run a Model Manager Sender Node, execute:

python3 sender.py

To stop a Model Manager Sender Node, simply run ctrl+C.

  • Inference Node

To run an Inference Node, execute:

python3 inference.py

To stop an Inference Node, simply run ctrl+C.

3.2.2.2. Automatic Execution

To automatically run the AML-IP nodes, follow the steps in the Manage AML-IP nodes with the AML-Dashboard section.

3.2.3. AML Dashboard

To run the dashboard, follow the steps below:

  1. Navigate to the frontend/aml_dashboard directory.

cd frontend/aml_dashboard
  1. Start the dashboard:

npm run dev

With the AML Dashboard up and running, you can access it at the following address:

http://localhost:5173/

3.2.3.1. Data Management Tab

There are several options available for dataset creation:

Record hand gestures.

  1. Choose Sensors from the drop-down menu in the Choose the model for the training set section.

  2. Activate the video switch in the webcam section to enable webcam capture.

  3. Specify the label of the dataset in the Instance label section.

  4. Click on the Hold to record instances button in the Capture instances to the training set to start recording instances.

  5. Once recorded, the dataset will be promptly displayed in the dataset browser section for easy access and management.

Select a standard dataset from the system.

  1. Choose a dataset from the drop-down menu in the Choose the model for the training set section.

  2. Click on the Load dataset button to load the selected dataset.

  3. The dataset will be displayed in the dataset browser section for easy access and management.

Load a custom dataset.

Warning

The custom dataset must be in the correct format to be loaded successfully. This is explained in the Collecting data tutorial.

  1. Choose Custom from the drop-down menu in the Choose the model for the training set section.

  2. Click on the Load dataset button to load the custom dataset.

  3. A popup will appear, allowing you to select the desired dataset from your local machine.

  4. Once loaded, the dataset will be displayed in the dataset browser section for easy access and management.

Note

In order to be able to train a model, you must have at least two classes in the dataset.

../../../_images/aml-dashboard_data_management.png

3.2.3.2. Training Tab

To train a model using AML, follow these steps:

Note

Please ensure that at least one Computing Node is running to facilitate the training process.

  1. Specify the number of parallel trainings (executions) you wish to run.

  2. Define the number of iterations per execution.

  3. Set the percentage of dataset to distribute in each execution.

  4. Specify the target class when the classification is binary (this is the case when standard or custom datasets are used).

  5. Optionally, an atomization file can be uploaded to the system, allowing to start the training process with a pre-trained model.

  1. Click on the Train button in the AML Training Launcher to initiate the training process.

  2. Once the training is completed, the model status will appear as Finished :) in the AML Status.

  3. If the training process fails, an error message will be displayed indicating the reason for the failure.

../../../_images/aml-dashboard_trained.png

3.2.3.3. Fetching Tab

To fetch a model, follow these steps:

Note

Make sure that at least one Model Manager Sender Node is running to facilitate the model fetching process.

  1. Click on the Search for statistics button in the AML Statistics Fetcher.

  2. Once the statistics are received, the status will appear as Statistics received ! in the AML Collaborative Learning Status.

  3. Click on the Request model button in the AML Model Fetcher.

  4. Once the model is received, the status will change to Model received ! in the AML Collaborative Learning Status.

  5. If the fetching process fails, an error message will be displayed indicating an error.

../../../_images/aml-dashboard_fetched.png

3.2.3.4. Batch Prediction Tab

To predict the output of a dataset, follow these steps:

Note

Ensure that you have access to at least one AML Model to facilitate the batch prediction process.

  1. Click on the Update predictions button in the Algebraic Machine Learning.

  2. The predictions will be displayed in the Results Algebraic Machine Learning plot.

../../../_images/aml-dashboard_batch_prediction_done.png

3.2.3.5. Real-Time Prediction Tab

Warning

This feature is only available when the dataset is Sensors.

To predict the output of webcam images in real^time using an AML Model, follow these steps:

Note

Ensure that you have access to at least one AML Model to facilitate the real^time prediction process.

  1. Toggle the prediction switch in the Predict for AML section and activate the video switch in the webcam section.

  2. The predictions will be displayed in the Results AML plot.

../../../_images/aml-dashboard_real_time_done.png

3.2.3.6. Context Broker Tab

To create and update data to the Context Broker and get the solution (inference) from the AML Model, follow these steps:

Note

Make sure that the Context Broker is running to ensure successful interaction and data exchange. The Context Broker can be installed and configured by following the instructions provided here.

  1. Specify the Fiware Node parameters and Context Broker entity ID and attributes.

  2. Click on the Create button to create the node using the provided parameters.

  3. The Fiware Node Status will update to indicate whether the node has been created successfully.

  4. Drag and drop an image or upload a file in the designated area to upload data.

  5. Click the Post Data button to send the data to the Context Broker.

  6. The Data Status will update to indicate whether the data has been successfully posted.

  7. Once the solution is received, it will be displayed in the Context Broker Solution section and the Solution Status will update to Solution received ! to indicate successful retrieval.

  8. If the solution retrieval process fails, an error message will be displayed indicating an error.

../../../_images/aml-dashboard_context_broker_created.png

3.2.3.7. Status Tab

The status tab automatically refreshes every second, ensuring you receive real-time updates and information about the network’s status.

../../../_images/aml-dashboard_status_nodes_created.png