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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac3223c0a63f03cc4bfab82a160466f41aa094be5519934a57658047bad875e |
|
MD5 | b16910742bac4045c71896484564a2c7 |
|
BLAKE2b-256 | f855c6510b0de7dcec84918c3208b97f9449ed8e2f87234955d06e752b0fdf1d |
Close
Hashes for apeman_model_client-0.1.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f39dbf7a8e351c4eaf550f85b5f8b2a45040fffa9616b06be4d2a3fff7eae500 |
|
MD5 | 0cf2f9c64ec120eb38c8c05580168f37 |
|
BLAKE2b-256 | bcc42c012cb385b2f1cdc42d36372ac1c605578d0dd875886f1307a7c60b9ed2 |