Skip to content

TensorChord Modelz Python SDK and CLI with aiohttp

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.modelz-py
Notifications You must be signed in to change notification settings

tddschn/aiomodelz

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 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

About

TensorChord Modelz Python SDK and CLI with aiohttp

Topics

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.modelz-py

Stars

Watchers

Forks

Packages

No packages published