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

com.linkedin.dagli.dag.PreparedDAGTransformer 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.dag;

import com.linkedin.dagli.transformer.PreparedTransformer;
import com.linkedin.dagli.transformer.internal.PreparedTransformerInternalAPI;


/**
 * Subtype for Prepared DAGs
 *
 * @param  the type of result of the DAG
 * @param  the type of the DAG
 */
public interface PreparedDAGTransformer & PreparedTransformer>
    extends DAGTransformer, PreparedTransformer {
  interface InternalAPI & PreparedTransformer>
      extends DAGTransformer.InternalAPI, PreparedTransformerInternalAPI {
    /**
     * Returns a copy of this DAG that has the same properties (other than the DAG structure itself) as another DAG.
     *
     * @param other the other DAG's whose properties should be copied
     * @return a copy of this DAG that has the same properties (other than the DAG structure itself) as another DAG
     */
    default S withSameProperties(DAGTransformer other) {
      return getInstance().withExecutor(other.internalAPI().getDAGExecutor())
          .withReduction(other.internalAPI().getReductionLevel());
    }
  }

  InternalAPI internalAPI();

  /**
   * Returns a copy of this DAG that will use the given {@link DAGExecutor} that will be used to execute this DAG.
   *
   * @param executor the {@link DAGExecutor} to use
   * @return a copy of this instance that will use the provided executor
   */
  S withExecutor(PreparedDAGExecutor executor);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy