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

com.linkedin.dagli.tester.Tester 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.tester;

import com.linkedin.dagli.generator.Generator;
import com.linkedin.dagli.transformer.PreparableTransformer;
import com.linkedin.dagli.transformer.PreparedTransformer;
import com.linkedin.dagli.view.TransformerView;


/**
 * Static convenience methods for testing Dagli nodes.
 */
public abstract class Tester {
  private Tester() { }

  /**
   * Convenience method that creates a test builder instance for the provided Dagli node.
   *
   * @param generator the node to test
   * @return a test builder that will test the provided node
   */
  public static > GeneratorTestBuilder of(T generator) {
    return new GeneratorTestBuilder<>(generator);
  }

  /**
   * Convenience method that creates a test builder instance for the provided Dagli node.
   *
   * @param view the node to test
   * @return a test builder that will test the provided node
   */
  public static , T extends TransformerView>
  TransformerViewTestBuilder of(T view) {
    return new TransformerViewTestBuilder<>(view);
  }

  /**
   * Convenience method that creates a test builder instance for the provided Dagli node.
   *
   * @param transformer the node to test
   * @return a test builder that will test the provided node
   */
  public static > PreparedTransformerTestBuilder of(T transformer) {
    return new PreparedTransformerTestBuilder<>(transformer);
  }

  /**
   * Convenience method that creates a test builder instance for the provided Dagli node.
   *
   * @param transformer the node to test
   * @return a test builder that will test the provided node
   */
  public static , T extends PreparableTransformer>
  PreparableTransformerTestBuilder of(T transformer) {
    return new PreparableTransformerTestBuilder<>(transformer);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy