Interface JobFunction<I,​O>

  • Type Parameters:
    I - the job input type
    O - the job output type
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface JobFunction<I,​O>
    A function describing the action to take in a Job.
    • Method Detail

      • apply

        java.util.List<O> apply​(java.util.List<I> inputs)
                         throws ai.djl.translate.TranslateException
        Applies this function.
        Parameters:
        inputs - the batch of inputs to run
        Returns:
        the batch of results
        Throws:
        ai.djl.translate.TranslateException - if it fails to run