Apeman model service client SDK
Project description
This library enables you to report the status of tasks in your model at runtime
publish:
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
install: pip install apeman-model-client==0.1.8
How to use
export apeman_meta_server_addr='localhost:9090'
from apeman.model.openapi import apemanOpenApi
from apeman.model.openapi.model_instance_task_status import TaskStatus
from apeman.model.openapi.model_instance_task_launch_type import TaskLaunchType
from apeman.model.openapi.model_instance_task_type import TaskType
client = apemanOpenApi.ApemanModelServiceClient()
# get endpoint of other model
client.get_endpoint(model_instance_id='test')
# report status
client.report(task_id='', status=TaskStatus.RUNNING, progress=0.1, message='test', token='')
# create new instance tak
task_id = client.add_model_instance_task(model_instance_id='test', tenant_id='test', task_token='token',
task_parameters='parameters', job_context='jobContext', start_time=1111, end_time=11111,
launch_type=TaskLaunchType.TASK_ADHOC, task_type=TaskType.TASK_TRAIN)
# get instance task
task = client.get_instance_task(model_instance_task_id='test', token='token')
print(task.taskProgress)
print(task.taskMessage)
print(task.taskStatus)
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
Built Distribution
Close
Hashes for apeman-model-client-0.1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a5c0042ed23dbdbeeb6dfbef353d903efadb488df8fb12a94eacfc07e8c397 |
|
MD5 | 0e01dd869261c490cd407888428ec37d |
|
BLAKE2b-256 | 91d2e6c76b1efc6b43c56ed9f8cec580ee8e24400d4dca2314d4fca4e10626c4 |
Close
Hashes for apeman_model_client-0.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f9f5771f37358f8e49f367e4ceaa74f42068003b2f316893374d441905b81f |
|
MD5 | cce9da04efd35ee91efb0443b57c2015 |
|
BLAKE2b-256 | eb1c9d7eada5f351470ff6692d1645bf200a4c96061deb40494fbb4229b85f8b |