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.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee1404880eee64844509534c65f2dc72c8e5a2d1118a5dee309b32f709fb2f4f |
|
MD5 | 3c2d63c5e53fc940769382369d634e69 |
|
BLAKE2b-256 | 3bf73dc7cac0f8ba183b41423a64894e134b92d27d88d1be5c4ba3e5b29e55cf |
Close
Hashes for apeman_model_client-0.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748d4de74afae06e2ad89a431458c77a4a93b6c60c0cd083f0b0bc56d36f5236 |
|
MD5 | 5f37673dd038f11c86eebfb52941a16b |
|
BLAKE2b-256 | 0d502fd66c0816fe62a15b749d1b1ab0cf50a80798020dc64738ffab59192727 |