A python based Overwatch Client for interacting with the overwatch server with higher level apis.
Project description
Overwatch Client
This is a python client for the Overwatch REST API. This implementation is a work in progress but is still able to communicate with the overwatch server and register/infer models.
from overwatch_client import HTTPClient
client = HTTPClient(
overwatch_server_url = "https://overwatch.distributive.network",
model_registry_url = "https://models.overwatch.distributive.network"
)
print(f"Can we connect? {client.check_overwatch_server_connection()}")
#### Register a Model
response = client.register_model(
model_name = "my_model",
model_path = "./my_model.onnx",
preprocess_path = "./preprocess.py",
postprocess_path = "./postprocess.py",
password = "my_password",
language = "python",
packages = ["numpy", "pandas", "opencv-python"]
)
print(response.text) ### Model registered successfully!
#### Infer a Model
response = client.infer(
inputs = files, # a list of the bytes of each input
model_name = "my_model",
slice_batch = 1, # number of inputs per slice
inference_id = "my_inference_id", # An identifier for the inference
compute_group_info = "joinKey/joinSecret" # The compute group info for the inference
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
overwatch_client-0.1.3.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for overwatch_client-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575be25bdcde3042b9dbe1404200396a140eb306a87c77645c687d9093b34e22 |
|
MD5 | 82b3c7c439f6a7e7c7af2f62209acf0c |
|
BLAKE2b-256 | e5fcf469446cbeabda96b8ba2361507d81d039220083549f47732dd1ee0d2c65 |