Search in sources :

Example 1 with CreateModelProcessor

use of ml.shifu.shifu.core.processor.CreateModelProcessor in project shifu by ShifuML.

the class ShifuCLI method createNewModel.

/*
     * Create new model - create directory and ModelConfig for the model
     */
public static int createNewModel(String modelSetName, String modelType, String description) throws Exception {
    ALGORITHM modelAlg = null;
    if (modelType != null) {
        for (ALGORITHM alg : ALGORITHM.values()) {
            if (alg.name().equalsIgnoreCase(modelType.trim())) {
                modelAlg = alg;
            }
        }
    } else {
        modelAlg = ALGORITHM.NN;
    }
    if (modelAlg == null) {
        log.error("Unsupported algirithm - {}", modelType);
        return 2;
    }
    CreateModelProcessor p = new CreateModelProcessor(modelSetName, modelAlg, description);
    return p.run();
}
Also used : CreateModelProcessor(ml.shifu.shifu.core.processor.CreateModelProcessor) ALGORITHM(ml.shifu.shifu.container.obj.ModelTrainConf.ALGORITHM)

Aggregations

ALGORITHM (ml.shifu.shifu.container.obj.ModelTrainConf.ALGORITHM)1 CreateModelProcessor (ml.shifu.shifu.core.processor.CreateModelProcessor)1