lib.sedna.algorithms.unseen_task_processing.unseen_task_processing

Module Contents

Classes

UnseenTaskProcessing

Process unseen tasks given task update strategies

class lib.sedna.algorithms.unseen_task_processing.unseen_task_processing.UnseenTaskProcessing(estimator, unseen_task_allocation=None, **kwargs)[source]

Process unseen tasks given task update strategies

Parameters:

estimator: Instance

An instance with the high-level API that greatly simplifies machine learning programming. Estimators encapsulate training, evaluation, prediction, and exporting for your model.

cloud_knowledge_management: Instance of class CloudKnowledgeManagement unseen_task_allocation: Dict

Mining tasks of unseen inference sample.

train()[source]

Intialize unseen task groups

Returns: res: Dict

evaluation result.

task_index: Dict or str

unseen task index which includes models, samples, extractor and etc.

update(tasks, task_update_strategies, **kwargs)[source]
Parameters:
tasks: List[Task]

from the output of module task_update_decision

task_update_strategies: Dict

from the output of module task_update_decision

returns:

task_index – updated unseen task index of knowledge base

rtype:

Dict

predict(data, post_process=None, **kwargs)[source]

Predict the result for unseen data.

Parameters:
  • data (BaseDataSource) – inference sample, see sedna.datasources.BaseDataSource for more detail.

  • post_process (function) – function or a registered method, effected after estimator prediction, like: label transform.

Returns:

  • result (array_like) – results array, contain all inference results in each sample.

  • tasks (List) – tasks assigned to each sample.

load(task_index)[source]

load task_detail (tasks/models etc …) from task index file. It’ll automatically loaded during inference phases.

Parameters:

task_index_url (str) – task index file path.