kubeedge / sedna

AI tookit over KubeEdge
https://sedna.readthedocs.io
Apache License 2.0
497 stars 160 forks source link

Model Management module is needed. #55

Open jaypume opened 3 years ago

jaypume commented 3 years ago

Why a model management module is needed?

Currently, the model management capability of Sedna is fragmented and has the following problems:

1. Unclear module responsibilities.

It is found that the code for model uploading and downloading was duplicated in different modules(LC and Lib in Sedna), and they were even in different languages.
In this case, for example, if you want to extend the protocol for saving the model, you will add code with the same function to these different modules, which is difficult to maintain.

2. Difficult to leverage basic capabilities.

For example, the model saving function may be used for model compression and model conversion. it is not necessary to implement model saving function both in compression and model conversion.

3. Model basic functions interfaces are not designed in a unified manner.

For example, model compression and model deployment may be combined, as may model transformation and model deployment. If there is a basic interface to standardize the functions of the model, it can provide more flexible functions.

4. The style of interfaces exposed to users might be different.

Em.., this point is intuitive.

I will add some concrete examples to illustrate this later.

Current model management requirements

I summarize the requirements for model management of sedna's existing features.

Incremental Learning

Fncremental Learning

Joint Inference

Future model management requirements

Through a survay, I have learned that model can also have the following behavior:

For example, multi-task lifelong learning is in the roadmap of Sedna, it requires capabilities such as multi-model serving, model metric recording, and model metadata search.

Summary

Therefore, I hope that we can design an edge-cloud synergy model management component with a unified architecture and interface style based on current or future features.

jeffzhu503 commented 3 years ago

Based on this GitHub issue and the PowerPoint file circulated in the group, I am not clear what exactly the current design is. I assume that we don't have ModelManager yet. Are there two different proposals now? One is to introduce ModelManager, the other is Model Operator on slide #7? We need to identify the key difference between the manager, and the operator if we do have two different proposals. We might also want to have a clear definition of what these model behaviors are, how they are related between the model itself and the model manager/operator.

jaypume commented 3 years ago

Based on this GitHub issue and the PowerPoint file circulated in the group, I am not clear what exactly the current design is. I assume that we don't have ModelManager yet. Are there two different proposals now? One is to introduce ModelManager, the other is Model Operator on slide #7? We need to identify the key difference between the manager, and the operator if we do have two different proposals. We might also want to have a clear definition of what these model behaviors are, how they are related between the model itself and the model manager/operator.

@jeffzhu503 Sorry for making you misunderstood.

In Sedna, there is only a simple model object (crd) that contains one field named "model_url", the model crd is so simple that it's not a ModelManager. However, we find that there have requirements for model management in may scenarios. Therefore, we hope that a ModelManager component can be created as a basic component to better serve upper-layer AI jobs, including incremental learning, federated learning, and joint inference.

Here is the ModelManager proposal to replace the model crd in Sedna.