Manta documentation =================== The Manta platform aims to simplify, streamline, and make flexible the deployment of collaborative and decentralized AI at the edge. It is designed to address the challenges of deploying machine learning models on distributed, resource-constrained devices, enabling efficient and scalable AI operations closer to where data is generated. The platform is composed of four key components, each serving a specific role: 1. **Manta Core**: Facilitates the deployment and monitoring of your algorithms from a central interface. 2. **Manta Manager**: Orchestrates the deployment of user algorithms on various nodes, ensuring efficient distribution and management of tasks. 3. **Manta Node**: Allows algorithms to be deployed directly on edge devices, enabling on-device processing and reducing latency. 4. **Manta Light**: Ensures that tasks are executed locally on nodes, maintaining secure access and operations. Each component plays a crucial part in creating a seamless, decentralized AI environment. The subsequent sections will provide detailed insights into each component's functionality and their integration within the platform. .. image:: _static/images/light-overview.png :alt: Overview :class: only-light .. image:: _static/images/dark-overview.png :alt: Overview :class: only-dark Manta Core ---------- Manta Core is the user-side module of the Manta platform. It provides the necessary tools and interfaces to monitor the Manta platform (including the Manager and Nodes), manage data on the Nodes, and develop and deploy Swarms—decentralized and collaborative algorithms. Manta Core is essential for both controlling the platform and interacting with the data and algorithms deployed across the network of Nodes. Key Features ************ - **Manta Cluster Object**: The `Cluster` object in Manta Core connects to a Manta Manager instance, allowing the user to interact with and send requests to the Manta platform. This includes monitoring the status of the Nodes, managing data, and orchestrating the deployment of algorithms. - **Manta Swarm and Module**: Manta Core provides the `Swarm` abstraction, which represents a decentralized and collaborative algorithm. A :code:`Swarm` is composed of :code:`Modules`, each defining a specific Task that runs on a Node. The Manta Core allows users to develop these Swarms and deploy them across the Manta platform. Detailed guidance on developing and deploying Swarms can be found in the dedicated documentation section. - **Manta Simulation Module**: To facilitate the development and testing of Swarms, Manta Core includes a Simulation module. This allows users to simulate the entire Manta platform, including the Manager and Nodes, on a single host, enabling experimentation and testing of Swarm algorithms before deployment on the actual platform. Manta Manager ------------- The Manta Manager is the server-side component of the Manta platform, responsible for managing the nodes and bridging the user’s algorithms to the data residing on the nodes. It implements a gRPC server and must be accessible by the nodes to enable communication. The Manta Manager serves as the orchestration layer for decentralized and collaborative algorithms, ensuring efficient execution across a cluster of nodes. Key Features ************ - **Node Management**: The Manta Manager handles the registration and communication with nodes in the cluster, leveraging a gRPC server to maintain connections and facilitate task assignments. - **User Interaction**: A separate gRPC server allows users to interact with the cluster, submit algorithms, and monitor the execution of tasks. - **Task Orchestration**: The Manta Manager orchestrates tasks based on their definitions and the availability of nodes, ensuring optimal utilization of resources. - **Experiment Tracking and Monitoring**: Integrated database support enables tracking of experiments, including metrics, model parameters, and platform monitoring. This includes detecting node failures and monitoring task logs. .. TODO: Add a schema of the database, broker and Manager interconnected with ip addresses and ports. Manta Node ---------- The Manta Node is the edge component of the Manta deployment platform. It plays a crucial role in executing tasks at the edge, where data is generated and resides. The Manta Node receives task definitions (such as container images and scripts) from the Manta Manager and uses Docker to deploy these tasks locally in a secure and isolated environment. This setup ensures that tasks can be run flexibly, leveraging libraries and frameworks such as PyTorch, TensorFlow, and ONNX. Moreover, the Manta Node provides secure access to local data on the node, including data generated by sensors or other processes, which is essential for analytics, model training, or inference. The Node is also responsible for interacting with the Manta Manager to obtain necessary information for efficient task execution, such as hyperparameters, model parameters (weights, biases), and performance metrics. To function correctly, the Manta Node must have access to the Manta Manager for gRPC communication and to the Mosquitto broker for MQTT communication. Additionally, Docker must be installed locally on the node to enable task deployment in secure, isolated environments. .. TODO: Add schema here for the connection between Node, Manager, Mosquitto, Light Server and Docker** Key Features ************ - **Edge Task Execution:** Receives and deploys tasks at the edge using Docker, ensuring secure and isolated execution environments. - **Secure Data Access:** Provides secure access to local data on the node for use in tasks, enabling analytics, model training, and inference. - **Communication with Manta Manager:** Maintains communication with the Manta Manager via gRPC for task orchestration and with the Mosquitto broker via MQTT for messaging. - **Flexible Task Deployment:** Supports the deployment of tasks that use popular AI/ML libraries like PyTorch, TensorFlow, and ONNX. Manta Light ----------- Manta Light is the user-side module of the Manta platform executed in a task. It allows to access local data on the node where the task is executed and share information between other nodes. Key Features ************ - **Manta Task Object**: Simple class to define a class and accessing local and global information. - **Manta World**: Class to send and receive infomations with other nodes under tags. Information are categorized into two categories : results and globals. Both are saved in the :code:`Manager` and can be analyzed later with :code:`manta_core`. When a result is saved into the :code:`Manager`, it is added as a new value in the database whereas when a global is saved, its previous value is replaced by the new one. Results behave like a disk which is filled over time whereas globals behave like a shared memory. - **Manta Local**: Class to access securely to local data. .. toctree:: :maxdepth: 3 :caption: Contents: installation deployment/index guide cli/index api/index