Skip to main content

Python SDK for Barbara Edge Computing Platform

Project description

Barbara-sdk: Python SDK for Barbara Edge Computing Platform

Deploy your machine learning models to the edge with the Barbara Python SDK. This intuitive library empowers you to streamline your workflow and accelerate edge AI development.

Features

  • Seamless Uploads: Upload your models directly from Python code or Jupyter Notebooks to your Barbara model library.
  • Simplified Deployment: Deploy models directly to edge nodes with just a few lines of code.
  • Enhanced Efficiency: Automate model training & deployment tasks and save valuable development time.
  • Streamlined Workflow: Integrate edge AI development seamlessly into your existing Python environment.

Prerequisites

  • Python (version 3.8 or higher)

Barbara API Credentials

To use this SDK you will need the following credentials:

  • Username: Your Barbara username.
  • Password: Your Barbara password.
  • Client Secret: This credential is only available for users with an Enterprise License.
  • Client Id: This credential is only available for users with an Enterprise License.

Obtaining Enterprise Credentials

If you have an Enterprise License and require the Client Secret and Client ID, please contact Barbara support by sending an email to support@barbara.tech.

Security Note

We strongly recommend storing your username and password securely and avoiding embedding them directly in your code. Consider using environment variables or a secure credential management solution.

Installation with pip

pip install barbara-sdk

Usage

Import the SDK:

import barbara

Create an instance of the SDK

bbr = barbara.ApiClient('client_id', 'client_secret', 'username', 'password')

Replace 'client_id', 'client_secret', 'username' and 'password' with your actual API credentials.

Uploading models to your Library

  • Tensorflow over TFX
bbr.models.upload('model_path', 'model_name')

or

bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE=TENSORFLOW_SAVED_MODEL, engine=barbara.ENGINE_TYPE.TENSORFLOW_TFX)
  • Tensorflow over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.TENSORFLOW_SAVED_MODEL, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)
  • Torchscript over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.PYTORCH_TORCHSCRIPT, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)
  • Onnx over NVIDIA Triton
bbr.models.upload('model_path', 'model_name', model_type=barbara.MODEL_TYPE.ONNX, engine=barbara.ENGINE_TYPE.NVIDIA_TRITON)

Listing models in your Library

bbr.models.list()

Listing Edge Nodes

bbr.nodes.list()

Deploy a model to an Edge Node

bbr.models.deploy('edge_node_name', 'model_name')
bbr.models.deploy('edge_node_name', 'model_over_tfx_name', grpc_port=9000, rest_port=9001)
bbr.models.deploy('edge_node_name', 'model_over_nvidia_triton_name', grpc_port=9000, rest_port=9001, monitoring_port=9002)
bbr.models.deploy('edge_node_name', 'model_over_mlflow_name', grpc_port=9000, rest_port=9001, monitoring_port=9002, release_notes='-Added new classes\n-Improved performance')

Deploy a model to an Edge Node with GPU

bbr.models.deploy('edge_node_name', 'model_name', gpu=True)

Documentation

For detailed API reference and code examples, please refer to Barbara Academy

License

See the LICENSE file for details.

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

barbara_sdk-1.2.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

barbara_sdk-1.2.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file barbara_sdk-1.2.1.tar.gz.

File metadata

  • Download URL: barbara_sdk-1.2.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for barbara_sdk-1.2.1.tar.gz
Algorithm Hash digest
SHA256 cc27c5913d9b132c7bd6242cc975032a178fffced10394c1e1b258cc9c4de36b
MD5 8f3a65071c2e887497f84b95a34d09d7
BLAKE2b-256 3236cf18a1835e3badbae07ffb0f674a90b367b49cf7af24bf1edd66ca395abd

See more details on using hashes here.

File details

Details for the file barbara_sdk-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: barbara_sdk-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for barbara_sdk-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 546aab1e698cc033b74387eac56e026a38d185ae13eda2e08597bc626b32af7e
MD5 b0f91718a07f81b9f78ba76eb2e55311
BLAKE2b-256 a47fd1535da3ec5fb9b64e0f79f8e2fc5d43b5a975f5504b9d6fd01da39b6667

See more details on using hashes here.

Supported by

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