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

com.linkedin.dagli.preparer.AbstractStreamPreparer1 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
// AUTOGENERATED CODE.  DO NOT MODIFY DIRECTLY!  Instead, please modify the preparer/AbstractStreamPreparerX.ftl file.
// See the README in the module's src/template directory for details.
package com.linkedin.dagli.preparer;

import com.linkedin.dagli.transformer.PreparedTransformer1;
import com.linkedin.dagli.objectio.ObjectReader;


/**
 * A common abstract base class that {@link Preparer}s prepared using {@link PreparerMode#STREAM} mode are highly
 * encouraged to extend.  Besides simplifying the code and improving readability, this also helps insulate the derived
 * class's implementation from future changes in the Dagli Framework.
 *
 * @param  the type of the first input
 * @param  result type of the transformer prepared by this preparer
 * @param  the type of {@link com.linkedin.dagli.transformer.PreparedTransformer} prepared by this preparer
 */
public abstract class AbstractStreamPreparer1> extends
    AbstractPreparer1 {
  @Override
  public final PreparerMode getMode() {
    return PreparerMode.STREAM;
  }

  /**
   * Completes preparation to obtain the final, prepared transformer result.  This method is called after all
   * preparation data has been process(...)'ed
   *
   * @return a {@link PreparerResultMixed} containing the resultant prepared transformers (often these are the same
   *         instance; a {@link Preparer} can, however, return a different transformer to be used on preparation and
   *         future ("new") data, which is useful in certain sophisticated use cases)
   */
  public abstract PreparerResultMixed, N> finish();

  @Override
  public final PreparerResultMixed, N> finish(
      ObjectReader inputs) {
    return finish();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy