-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide a graph-level model metadata #1728
Comments
Including some notes on possible implementation that would make related PR easier to understand. Graph-level input / output shapes from model-level metadataWe could leverage a model-level metadata to derive graph-level inputs and outputs shapes. 1. Single - node deploymentIn case of single-node graph model-level inputs and outputs, x and y, will simply be also the graph-level inputs and outputs Deployment ManifestapiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: seldon-model
spec:
name: model
predictors:
- componentSpecs:
- spec:
containers:
- image: example/model:version
name: my-model
graph:
name: my-model
type: MODEL
children: []
name: default
replicas: 1 Model Level:
Graph Level:
2. Multi - node deployment: chained nodesIn case of multi-node graph with multiple models chained such that output of one model is input of the next one The graph-level input x will be first model’s input x and graph-level output y will be the last model’s output y2=y. We will also have additional constraint that shapes of outputs in earlier model must match the shape of input in later model, it is y1=x2. Deployment ManifestapiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: seldon-model
spec:
name: model
predictors:
- componentSpecs:
- spec:
containers:
- image: example/model-1:version
name: my-model-1
- image: example/model-2:version
name: my-model-2
graph:
name: my-model-1
type: MODEL
children:
- name: my-model-2
type: MODEL
children: []
name: default
replicas: 1 Model Level:
Graph Level:
3. Multi - node deployment: combinerIn case of multi-node graph with combiner linked to few models Input x is first passed to models and their outputs, y1 and y2 passed to combiner which returns the graph output y: Models should expect inputs of same shape: graph-level input x Output of combiner defines the graph-level output y Deployment ManifestapiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: seldon-model
spec:
name: model
predictors:
- componentSpecs:
- spec:
containers:
- image: example/combiner:version
name: my-combiner
- image: example/model-1:version
name: my-model-1
- image: example/model-2:version
name: my-model-2
graph:
name: my-combiner
type: COMBINER
children:
- name: my-model-1
type: MODEL
children: []
- name: my-model-2
type: MODEL
children: []
name: default
replicas: 1 Model Level:
Graph Level:
4. Multi - node deployment: routerIn case of multi-node graph with outer the router passes input x to one of the models, model 1 or model 2 and returns output of that model, yor y2, as the graph-level output y. It may not be unreasonable to expect both (or more) models to: accept same shaped input x return same shaped output y, it is shape(y1) = shape(y2)should be satisfied Detailed json exmaple This wouldn’t be much different from the above. Will be added later for clarification. 5. Miscellaneous combination of the aboveA more complicated graph may consist of the basic elements describe above. |
Currently #1671 which closes #1638 will only implemented model metadata on single graph components.
It would be nice to also have metadata for the whole graph where input would be the input of first node and output the output of the last node.
Open questions are how it should work with
router
andcombiner
elements in the graph.Anyway, probably the easiest is to implement in executor a logic that would go to
/metadata
endpoints of each component and expose graph-level metadata.The text was updated successfully, but these errors were encountered: