lib.sedna.service.client

Module Contents

Classes

LCReporter

Inherited thread, which is an entity that periodically report to

LCClient

send info to LC by http

AggregationClient

Client that interacts with the cloud aggregator.

ModelClient

Remote model service

KBClient

Communicate with Knowledge Base server

Functions

http_request(url[, method, timeout, binary, no_decode])

lib.sedna.service.client.http_request(url, method=None, timeout=None, binary=True, no_decode=False, **kwargs)[source]
class lib.sedna.service.client.LCReporter(lc_server, message, period_interval=30)[source]

Bases: threading.Thread

Inherited thread, which is an entity that periodically report to the lc.

update_for_edge_inference()[source]
update_for_collaboration_inference()[source]
run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class lib.sedna.service.client.LCClient[source]

send info to LC by http

classmethod send(lc_server, worker_name, message: dict)[source]
class lib.sedna.service.client.AggregationClient(url, client_id, **kwargs)[source]

Client that interacts with the cloud aggregator.

max_size[source]
async connect()[source]
send(data, msg_type='message', job_name='')[source]
recv(wait_data_type=None)[source]
class lib.sedna.service.client.ModelClient(service_name, version='', host='127.0.0.1', port='8080', protocol='http')[source]

Remote model service

check_server_status()[source]
inference(x, **kwargs)[source]

Use the remote big model server to inference.

class lib.sedna.service.client.KBClient(kbserver)[source]

Communicate with Knowledge Base server

upload_file(files, name='')[source]
update_db(task_info_file)[source]
update_task_status(tasks: str, new_status=1)[source]