Browse Source

http查询修改测试

dev-lhz
chenzhihang 1 year ago
parent
commit
280eda9a5e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AimServiceImpl.java

+ 3
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AimServiceImpl.java View File

@@ -28,6 +28,8 @@ public class AimServiceImpl implements AimService {
private String aimUrl; private String aimUrl;
@Value("${aim.proxyUrl}") @Value("${aim.proxyUrl}")
private String aimProxyUrl; private String aimProxyUrl;
@Resource
private HttpUtils httpUtils;


@Override @Override
public List<InsMetricInfoVo> getExpTrainInfos(Integer experimentId) throws Exception { public List<InsMetricInfoVo> getExpTrainInfos(Integer experimentId) throws Exception {
@@ -52,7 +54,7 @@ public class AimServiceImpl implements AimService {
} }
String encodedUrlString = URLEncoder.encode("run.experiment==\"" + experimentName + "\"", "UTF-8"); String encodedUrlString = URLEncoder.encode("run.experiment==\"" + experimentName + "\"", "UTF-8");
String url = aimProxyUrl + "/api/runs/search/run?query=" + encodedUrlString; String url = aimProxyUrl + "/api/runs/search/run?query=" + encodedUrlString;
String s = HttpUtils.sendGet(url, null);
String s = httpUtils.sendGet(url, null);
List<Map<String, Object>> response = JacksonUtil.parseJSONStr2MapList(s); List<Map<String, Object>> response = JacksonUtil.parseJSONStr2MapList(s);
System.out.println("response: " + JacksonUtil.toJSONString(response)); System.out.println("response: " + JacksonUtil.toJSONString(response));
if (response == null || response.size() == 0) { if (response == null || response.size() == 0) {


Loading…
Cancel
Save