com.linkedin.dagli.preparer.Preparer2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
DAG-oriented machine learning framework for bug-resistant, readable, efficient, maintainable and trivially deployable models in Java and other JVM languages
// AUTOGENERATED CODE. DO NOT MODIFY DIRECTLY! Instead, please modify the preparer/PreparerX.ftl file.
// See the README in the module's src/template directory for details.
package com.linkedin.dagli.preparer;
import com.linkedin.dagli.objectio.ObjectReader;
import com.linkedin.dagli.transformer.PreparedTransformer2;
import com.linkedin.dagli.util.invariant.Arguments;
import com.linkedin.dagli.tuple.Tuple2;
public interface Preparer2> extends Preparer {
@Override
default void processUnsafe(Object[] values) {
Arguments.check(values.length == 2, "2 arguments must be provided");
process((A) values[0], (B) values[1]);
}
/**
* Processes a single example of preparation data. To prepare a {@link Preparer}, process(...) will be called on
* each and every preparation example before finish(...) is called to complete preparation.
*
* This method is not assumed to be thread-safe and will not be invoked concurrently on the same {@link Preparer}.
*
* @param value1 the first value of the preparation example to be processed
* @param value2 the second value of the preparation example to be processed
*/
void process(A value1, B value2);
@Override
default PreparerResultMixed extends PreparedTransformer2 super A, ? super B, ? extends R>, N> finishUnsafe(
ObjectReader
© 2015 - 2024 Weber Informatics LLC | Privacy Policy