Skip to main content

Machine learning models optimized for robotics experimentation and deployment

Project description

RoboML 🤖

RoboML is an aggregator package written for quickly deploying open source ML models for robots. It is designed to cover two basic use cases.

  • Readily deploy various useful models: The package provides a wrapper around the 🤗 Transformers and SentenceTransformers libraries. Pretty much all relevant open source models from these libraries can be quickly deployed behind a highly scalable server endpoint.
  • Deploy Detection Models with Tracking: With RoboML one can deploy all detection models available in MMDetection. An open source vision model aggregation library. These detection models can also be seemlesly used for tracking.
  • Use Open Source Vector DBs: RoboML provides a unified interface for deploying Vector DBs along with ML models. Currently it is packaged with ChromaDB an open source multimodal vector database.
  • Aggregate robot specific ML models from the Robotics community: RoboML aims to be an aggregator package of models trained by the robotics community. These models can range from Multimodal LLMs, vision models, or robot action models, and can be used with ROS based functional components. See the usage in ROS Agents

Installation

RoboML has been tested on Ubuntu 20.04 and later. It should ideally be installed on a system with a GPU and CUDA 12.1. However, it should work without a GPU. If you encounter any installation problems, please open an issue.

pip install roboml

From Source

git clone https://github.com/automatika-robotics/roboml.git && cd roboml
virtualenv venv && source venv/bin/activate
pip install pip-tools
pip install .

For vision models support

If you want to utilize detection and tracking using Vision models from the MMDetection library, you will need to install a couple of dependancies as follows:

  • Install roboml using the vision flag: pip install roboml[vision]
  • Install mmcv using the installation instructions provided here. For installation with pip, simply pick PyTorch and CUDA version that you have installed and copy the pip installation command generated.
  • Install mmdetection as follows:
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -v -e .

Build in a Docker container (Recommended)

git clone https://github.com/automatika-robotics/roboml.git && cd roboml
docker build --tag=automatika:roboml .
docker run --runtime=nvidia --gpus all --rm -p 8000:8000 automatika:roboml

Servers

By default roboml starts models as ray serve apps. Making the models scalable accross multiple infrastructure configurations. See ray serve for details.

An Experimental Server based on RESP

When using ML models on robots, latency is a major consideration. When models are deployed on distributed infrastructure (and not on the edge, due to compute limitations), latency depends on both the model inference time and server communication time. Therefore, RoboML also implements an experimental server built using RESP which can be accessed using any redis client. RESP is a human readable binary safe protocol, which is very simple to parse and thus can be used to implement servers significatly faster than HTTP, specially when the payloads are also packaged binary data (for example images, audio or video data). The RESP server uses msgpack a cross-platform library available in over 50 languages, to package data instead of JSON. Work on the server was inspired by earlier work of @hansonkd and his Tino project.

Usage

To run an HTTP server simply run the following in the terminal

roboml

To run an RESP based server, run

roboml-resp

In order to see how these servers are called from a ROS package that implements its clients, please refer to ROS Agents documentation.

Running Tests

To run tests, install with:

pip install ".[dev]"

And run the following in the root directory

python -m pytest

Copyright

The code in this distribution is Copyright (c) 2024 Automatika Robotics unless explicitly indicated otherwise.

ROS Agents is made available under the MIT license. Details can be found in the LICENSE file.

Contributions

ROS Agents has been developed in collaboration betweeen Automatika Robotics and Inria. Contributions from the community are most welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roboml-0.2.1.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

roboml-0.2.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file roboml-0.2.1.tar.gz.

File metadata

  • Download URL: roboml-0.2.1.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for roboml-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1f60e57b98ae8785fc46203191d2d4061a267817ced899de3d6f2107406f912a
MD5 2724241f722d06a70b01fd891d332eb8
BLAKE2b-256 7962c3300130459a84e00ef734f0601498a9075a897f16423448e34b797ba0d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for roboml-0.2.1.tar.gz:

Publisher: build_and_publish.yml on automatika-robotics/roboml

Attestations:

File details

Details for the file roboml-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: roboml-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for roboml-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76a472a457466606f4bb16f9f17fa5a985083174f36b0518a116d583bb4fd765
MD5 534f374a86d4a255a1bfaf5ea6c0c4b2
BLAKE2b-256 7ae433150038e88eceafc3ce9121c306e9c156ce01fdcdcf24486de48d1a951d

See more details on using hashes here.

Provenance

The following attestation bundles were made for roboml-0.2.1-py3-none-any.whl:

Publisher: build_and_publish.yml on automatika-robotics/roboml

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page