| @@ -26,8 +26,8 @@ public class Ray { | |||||
| @ApiModelProperty(value = "数据集挂载路径") | @ApiModelProperty(value = "数据集挂载路径") | ||||
| private String model; | private String model; | ||||
| @ApiModelProperty(value = "代码") | |||||
| private String code; | |||||
| @ApiModelProperty(value = "代码配置") | |||||
| private String codeConfig; | |||||
| @ApiModelProperty(value = "镜像") | @ApiModelProperty(value = "镜像") | ||||
| private String image; | private String image; | ||||
| @@ -47,7 +47,7 @@ public class RayServiceImpl implements RayService { | |||||
| ray.setCreateBy(username); | ray.setCreateBy(username); | ||||
| ray.setUpdateBy(username); | ray.setUpdateBy(username); | ||||
| ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset())); | ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset())); | ||||
| ray.setCode(JacksonUtil.toJSONString(rayVo.getCode())); | |||||
| ray.setCodeConfig(JacksonUtil.toJSONString(rayVo.getCodeConfig())); | |||||
| ray.setModel(JacksonUtil.toJSONString(rayVo.getModel())); | ray.setModel(JacksonUtil.toJSONString(rayVo.getModel())); | ||||
| ray.setImage(JacksonUtil.toJSONString(rayVo.getImage())); | ray.setImage(JacksonUtil.toJSONString(rayVo.getImage())); | ||||
| ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters())); | ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters())); | ||||
| @@ -68,7 +68,7 @@ public class RayServiceImpl implements RayService { | |||||
| ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters())); | ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters())); | ||||
| ray.setPointsToEvaluate(JacksonUtil.toJSONString(rayVo.getPointsToEvaluate())); | ray.setPointsToEvaluate(JacksonUtil.toJSONString(rayVo.getPointsToEvaluate())); | ||||
| ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset())); | ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset())); | ||||
| ray.setCode(JacksonUtil.toJSONString(rayVo.getCode())); | |||||
| ray.setCodeConfig(JacksonUtil.toJSONString(rayVo.getCodeConfig())); | |||||
| ray.setModel(JacksonUtil.toJSONString(rayVo.getModel())); | ray.setModel(JacksonUtil.toJSONString(rayVo.getModel())); | ||||
| ray.setImage(JacksonUtil.toJSONString(rayVo.getImage())); | ray.setImage(JacksonUtil.toJSONString(rayVo.getImage())); | ||||
| rayDao.edit(ray); | rayDao.edit(ray); | ||||
| @@ -93,8 +93,8 @@ public class RayServiceImpl implements RayService { | |||||
| if (StringUtils.isNotEmpty(ray.getDataset())) { | if (StringUtils.isNotEmpty(ray.getDataset())) { | ||||
| rayVo.setDataset(JsonUtils.jsonToMap(ray.getDataset())); | rayVo.setDataset(JsonUtils.jsonToMap(ray.getDataset())); | ||||
| } | } | ||||
| if (StringUtils.isNotEmpty(ray.getCode())) { | |||||
| rayVo.setCode(JsonUtils.jsonToMap(ray.getCode())); | |||||
| if (StringUtils.isNotEmpty(ray.getCodeConfig())) { | |||||
| rayVo.setCodeConfig(JsonUtils.jsonToMap(ray.getCodeConfig())); | |||||
| } | } | ||||
| if (StringUtils.isNotEmpty(ray.getModel())) { | if (StringUtils.isNotEmpty(ray.getModel())) { | ||||
| rayVo.setModel(JsonUtils.jsonToMap(ray.getModel())); | rayVo.setModel(JsonUtils.jsonToMap(ray.getModel())); | ||||
| @@ -70,7 +70,7 @@ public class RayVo { | |||||
| private String runState; | private String runState; | ||||
| @ApiModelProperty(value = "代码") | @ApiModelProperty(value = "代码") | ||||
| private Map<String, Object> code; | |||||
| private Map<String, Object> codeConfig; | |||||
| private Map<String, Object> dataset; | private Map<String, Object> dataset; | ||||
| @@ -2,10 +2,10 @@ | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.ruoyi.platform.mapper.RayDao"> | <mapper namespace="com.ruoyi.platform.mapper.RayDao"> | ||||
| <insert id="save"> | <insert id="save"> | ||||
| insert into ray(name, description, dataset, model, code, main_py, num_samples, parameters, points_to_evaluate, storage_path, | |||||
| insert into ray(name, description, dataset, model, code_config, main_py, num_samples, parameters, points_to_evaluate, storage_path, | |||||
| search_alg, scheduler, metric, mode, max_t, | search_alg, scheduler, metric, mode, max_t, | ||||
| min_samples_required, resource, image, create_by, update_by) | min_samples_required, resource, image, create_by, update_by) | ||||
| values (#{ray.name}, #{ray.description}, #{ray.dataset}, #{ray.model}, #{ray.code}, #{ray.mainPy}, #{ray.numSamples}, #{ray.parameters}, | |||||
| values (#{ray.name}, #{ray.description}, #{ray.dataset}, #{ray.model}, #{ray.codeConfig}, #{ray.mainPy}, #{ray.numSamples}, #{ray.parameters}, | |||||
| #{ray.pointsToEvaluate}, #{ray.storagePath}, | #{ray.pointsToEvaluate}, #{ray.storagePath}, | ||||
| #{ray.searchAlg}, #{ray.scheduler}, #{ray.metric}, #{ray.mode}, #{ray.maxT}, #{ray.minSamplesRequired}, | #{ray.searchAlg}, #{ray.scheduler}, #{ray.metric}, #{ray.mode}, #{ray.maxT}, #{ray.minSamplesRequired}, | ||||
| #{ray.resource}, #{ray.image}, #{ray.createBy}, #{ray.updateBy}) | #{ray.resource}, #{ray.image}, #{ray.createBy}, #{ray.updateBy}) | ||||
| @@ -26,8 +26,8 @@ | |||||
| <if test="ray.model != null and ray.model !=''"> | <if test="ray.model != null and ray.model !=''"> | ||||
| model = #{ray.model}, | model = #{ray.model}, | ||||
| </if> | </if> | ||||
| <if test="ray.code != null and ray.code !=''"> | |||||
| code = #{ray.code}, | |||||
| <if test="ray.codeConfig != null and ray.codeConfig !=''"> | |||||
| code_config = #{ray.codeConfig}, | |||||
| </if> | </if> | ||||
| <if test="ray.image != null and ray.image !=''"> | <if test="ray.image != null and ray.image !=''"> | ||||
| image = #{ray.image}, | image = #{ray.image}, | ||||