dengzedong
5 天以前 6957a3e704e5128b994ffc94e50548a8af5e9093
模型运行log
已修改3个文件
11 ■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModelHandler.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictItemNormalHandlerImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModelHandler.java
@@ -21,5 +21,5 @@
     * @return
     * @throws ModelInvokeException
     */
    PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel) throws ModelInvokeException;
    PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName) throws ModelInvokeException;
}
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictItemNormalHandlerImpl.java
@@ -46,7 +46,7 @@
                throw new ModelInvokeException(MessageFormat.format("{0},itemId={1}",
                        ModelInvokeException.errorGetModelEntity, itemId));
            }
            predictResult = predictModelHandler.predictByModel(predictTime, predictModel);
            predictResult = predictModelHandler.predictByModel(predictTime, predictModel,predictItemDto.getItemName());
            predictResult.setPredictId(itemId);
        } catch (Exception ex) {
            throw new ItemInvokeException(MessageFormat.format("{0},itemId={1}",
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/impl/PredictModelHandlerImpl.java
@@ -1,5 +1,6 @@
package com.iailab.module.model.mdk.predict.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.iail.model.IAILModel;
@@ -54,7 +55,7 @@
     * @throws ModelInvokeException
     */
    @Override
    public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel) throws ModelInvokeException {
    public synchronized PredictResultVO predictByModel(Date predictTime, MmPredictModelEntity predictModel,String itemName) throws ModelInvokeException {
        PredictResultVO result = new PredictResultVO();
        if (predictModel == null) {
            throw new ModelInvokeException("modelEntity is null");
@@ -86,13 +87,13 @@
            param2Values[portLength] = newModelBean.getDataMap().get("models");
            param2Values[portLength + 1] = settings;
            log.info("####################### 预测模型 "+ "【itemId:" + predictModel.getItemid() + ",modelName" + predictModel.getMethodname() + "】 ##########################");
            log.info("####################### 预测模型 "+ "【itemId:" + predictModel.getItemid() + ",itemName" + itemName + "】 ##########################");
//            JSONObject jsonObjNewModelBean = new JSONObject();
//            jsonObjNewModelBean.put("newModelBean", newModelBean);
//            log.info(String.valueOf(jsonObjNewModelBean));
//            JSONObject jsonObjParam2Values = new JSONObject();
//            jsonObjParam2Values.put("param2Values", param2Values);
//            log.info(String.valueOf(jsonObjParam2Values));
            log.info("参数: " + JSON.toJSONString(param2Values));
            //IAILMDK.run
            HashMap<String, Object> modelResult = DllUtils.run(newModelBean, param2Values, predictModel.getMpkprojectid());