Skip to main content

machine learning models

Project description

TensorChord Modelz Python SDK and CLI

modelz-py with aiohttp

Basically, aioclient.py implements the async / aiohttp versions of Modelz* classes,
and client.py wraps around them with asyncio.run() calls.

Installation

pipx

This is the recommended installation method if you only want to use the CLI.

$ pipx install aiomodelz

pip

$ pip install aiomodelz

CLI Usage

$modelz --help

usage: modelz [-h] {inference,metrics,build} ...

modelz CLI

positional arguments:
  {inference,metrics,build}

options:
  -h, --help            show this help message and exit

Example Usage

CLI Inference

echo "cute cat" | modelz inference $PROJECT --serde msgpack --write-file cat.jpg --read-stdin

Python Interface

# use dotenv to load env
from dotenv import load_dotenv
load_dotenv()

# example .env:
# MODELZ_API_KEY=mzi-*****
# MODELZ_HOST=https://{}.cloud.modelz.dev/ # use this if you're using the dev modelz cluster
# MODELZ_SSL_VERIFY=0 # disable ssl verification

from modelz import AioModelzClient, ModelzClient
...

Develop

$ git clone https://github.com/tddschn/aiomodelz.git
$ cd aiomodelz
$ pdm install

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

aiomodelz-0.4.10.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

aiomodelz-0.4.10-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

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