All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.linkedin.dagli.preparer.AbstractStreamPreparerVariadic Maven / Gradle / Ivy

Go to download

DAG-oriented machine learning framework for bug-resistant, readable, efficient, maintainable and trivially deployable models in Java and other JVM languages

There is a newer version: 15.0.0-beta9
Show newest version
package com.linkedin.dagli.preparer;

import com.linkedin.dagli.objectio.ObjectReader;
import com.linkedin.dagli.transformer.PreparedTransformerVariadic;
import java.util.List;


/**
 * Base class for stream preparers for variadic-arity transformers.
 *
 * @param  the type of input consumed by the transformer
 * @param  the type of value produced by the transformer
 * @param  the type of the resultant prepared transformer
 */
public abstract class AbstractStreamPreparerVariadic>
    extends AbstractPreparerVariadic {

  /**
   * Dagli-internal method.  Not intended for use by client code.
   *
   * Completes preparation of the resultant transformers and returns them.
   *
   * @return the prepared transformers
   */
  public abstract PreparerResultMixed, N> finish();

  @Override
  public final PreparerMode getMode() {
    return PreparerMode.STREAM;
  }

  @Override
  public final PreparerResultMixed, N> finish(ObjectReader> inputs) {
    // the inputs parameter is ignored because this is a STREAM mode transformer; Preparers in STREAM mode (per the API)
    // always ignore the value passed to their finish(...) method.
    return finish();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy