Sequence Pipeline

Example of sequence pipeline

In this example, you'll create the configuration for a server. The same as the previous example, you'll print the configuration to demonstrate the step in details that will help you see the difference and notice the configuration contents.

  • Let's create a configuration by adding logging step in a sequence pipeline and print the output to JSON:

SequencePipeline sequencePipelineWithLoggingStep = SequencePipeline
                .builder()
                .add(new LoggingStep()) //add logging step into pipeline
                .build();
                
System.out.format("----------%n" +
                        "Pipeline with a Logging step output%n" +
                        "------------%n" +
                        "%s%n" +
                        "------------%n%n",
                sequencePipelineWithLoggingStep.toJson());
  • Call for default or empty inference configuration and print the output to JSON:

InferenceConfiguration defaultInferenceConfiguration = new InferenceConfiguration();

        System.out.format("----------%n" +
                        "Default inference configuration%n" +
                        "------------%n" +
                        "%s%n" +
                        "------------%n%n",
                defaultInferenceConfiguration.toJson());
  • Combine both to create complete configuration for a server:

You'll see the output similar to:

Last updated

Was this helpful?