Search in sources :

Example 1 with WithModelInfoBatchOp

use of com.alibaba.alink.common.lazy.WithModelInfoBatchOp in project Alink by alibaba.

the class Trainer method postProcessTrainOp.

protected BatchOperator<?> postProcessTrainOp(BatchOperator<?> trainOp) {
    LazyObjectsManager lazyObjectsManager = MLEnvironmentFactory.get(trainOp.getMLEnvironmentId()).getLazyObjectsManager();
    lazyObjectsManager.genLazyTrainOp(this).addValue(trainOp);
    if (this instanceof HasLazyPrintTrainInfo) {
        if (get(LAZY_PRINT_TRAIN_INFO_ENABLED)) {
            ((WithTrainInfo<?, ?>) trainOp).lazyPrintTrainInfo(get(LAZY_PRINT_TRAIN_INFO_TITLE));
        }
    }
    if (this instanceof HasLazyPrintModelInfo) {
        if (get(LAZY_PRINT_MODEL_INFO_ENABLED)) {
            ((WithModelInfoBatchOp<?, ?, ?>) trainOp).lazyPrintModelInfo(get(LAZY_PRINT_MODEL_INFO_TITLE));
        }
    }
    return trainOp;
}
Also used : LazyObjectsManager(com.alibaba.alink.common.lazy.LazyObjectsManager) HasLazyPrintModelInfo(com.alibaba.alink.common.lazy.HasLazyPrintModelInfo) HasLazyPrintTrainInfo(com.alibaba.alink.common.lazy.HasLazyPrintTrainInfo) WithModelInfoBatchOp(com.alibaba.alink.common.lazy.WithModelInfoBatchOp) WithTrainInfo(com.alibaba.alink.common.lazy.WithTrainInfo)

Aggregations

HasLazyPrintModelInfo (com.alibaba.alink.common.lazy.HasLazyPrintModelInfo)1 HasLazyPrintTrainInfo (com.alibaba.alink.common.lazy.HasLazyPrintTrainInfo)1 LazyObjectsManager (com.alibaba.alink.common.lazy.LazyObjectsManager)1 WithModelInfoBatchOp (com.alibaba.alink.common.lazy.WithModelInfoBatchOp)1 WithTrainInfo (com.alibaba.alink.common.lazy.WithTrainInfo)1