Search code examples
kuberneteskubeflowseldon

Route the output of model A as the input of model B on Seldon Core


I'm testing Seldon Core and am wondering if there is an easy way to route the output of model A as the input of model B on Seldon Core. What would be the best practice?


Solution

  • In a SeldonDeployment resource definition you have a graph section. The top-level element is the first step and it contains children for a next step. Here is a snippet from an example showing a transformer being used to transform a request before passing it on to a model:

        graph:
          children:
            - children: []
              implementation: XGBOOST_SERVER
              name: model
              modelUri: s3://model-image
              type: MODEL
          endpoint:
            type: REST
          name: feature-transformer
          type: TRANSFORMER
    

    There's an example in the seldon documentation where steps such as clean and tokenize are used to perform inference for natural language processing. That example has multiple steps as type MODEL. There's also discussion on this in the seldon slack channel.