Skip to content

Commit

Permalink
Merge branch 'develop-2.0.0' of https://github.com/FederatedAI/FATE-B…
Browse files Browse the repository at this point in the history
…oard into develop-2.0.0
  • Loading branch information
idwenwen committed Nov 30, 2023
2 parents e16bae4 + 7064b73 commit 621a2a0
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bin/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ main_class=org.fedai.fate.board.bootstrap.Bootstrap
module=fateboard


if test -f "${fatepath}/fate_flow/bin/init_env.sh";then
source ${fatepath}/fate_flow/bin/init_env.sh
if test -f "${fatepath}/fate/bin/init_env.sh";then
source ${fatepath}/fate/bin/init_env.sh
echo "JAVA_HOME=$JAVA_HOME"
else
echo "file not found:${fatepath}/fate_flow/bin/init_env.sh"
echo "file not found:${fatepath}/fate/bin/init_env.sh"
exit
fi

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fedai/fate/board/global/Dict.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class Dict {
static public final String COMPONENT_DEPENDENCIES = "dependencies";

static public final String SSH_CONFIG_FILE = "ssh_config_file";
static public final String LOG_LINE_NUM = "lineNum";
static public final String LOG_LINE_NUM = "line_num";
static public final String LOG_CONTENT = "content";
static public final String JOB_PROCESS = "process";
static public final String JOB_DURATION = "duration";
Expand Down Expand Up @@ -134,7 +134,7 @@ public class Dict {
logTypeMap.put("partyWarning", "task_warning");
logTypeMap.put("partyInfo", "task_info");
logTypeMap.put("partyDebug", "task_debug");
logTypeMap.put("componentInfo", "componentInfo");
logTypeMap.put("componentInfo", "task_info");
}

//the fields for job search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ private void logSize(Session session, String jobId, String role, String partyId,
reqMap.put(Dict.LOG_TYPE, logTypeEnum.getFlowValue());
reqMap.put(Dict.ROLE, role);
reqMap.put(Dict.PARTY_ID, partyId);
reqMap.put(Dict.TASK_NAME, componentId);
if (!Dict.DEFAULT.equals(componentId)) {
reqMap.put(Dict.TASK_NAME, componentId);
}
if (logQuery != null && StringUtils.isNotBlank(logQuery.getInstanceId())) {
reqMap.put(Dict.INSTANCE_ID,logQuery.getInstanceId());
}
Expand Down Expand Up @@ -192,7 +194,9 @@ private void logCat(Session session, String jobId, String role, String partyId,
reqMap.put(Dict.LOG_TYPE, Dict.logTypeMap.get(logQuery.getType()));
reqMap.put(Dict.ROLE, role);
reqMap.put(Dict.PARTY_ID, Integer.valueOf(partyId));
reqMap.put(Dict.TASK_NAME, componentId);
if (!Dict.DEFAULT.equals(componentId)){
reqMap.put(Dict.TASK_NAME, componentId);
}
reqMap.put(Dict.BEGIN, logQuery.getBegin());
reqMap.put(Dict.END, logQuery.getEnd());
if (logQuery != null && StringUtils.isNotBlank(logQuery.getInstanceId())) {
Expand All @@ -202,12 +206,13 @@ private void logCat(Session session, String jobId, String role, String partyId,
JSONObject object = JSONObject.parseObject(resultFlow);
JSONArray jsonArray = object.getJSONArray(Dict.DATA);


List<LogContentResponse.LogContent> contentData = new ArrayList<>();

for (int i = 0; i < jsonArray.size(); i++) {
JSONObject logData = (JSONObject) jsonArray.get(i);
String content = logData.get(Dict.LOG_CONTENT) == null ? "" : (String) logData.get(Dict.LOG_CONTENT);
String lineNum = logData.get(Dict.LOG_CONTENT) == null ? "" : (String) logData.get(Dict.LOG_CONTENT);
String lineNum = logData.get(Dict.LOG_LINE_NUM) == null ? "" : logData.get(Dict.LOG_LINE_NUM).toString();
LogContentResponse.LogContent logContent = new LogContentResponse.LogContent();
logContent.setContent(content);
logContent.setLineNum(lineNum);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ server.servlet.session.cookie.max-age=4h
management.endpoints.web.exposure.exclude=*
feign.client.config.default.connectTimeout=10000
feign.client.config.default.readTimeout=10000
component.config.dir=
component.config.dir=/data/projects/fate/fateboard/dag
69 changes: 69 additions & 0 deletions static/toy_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
component:
name: toy_example
description: ''
provider: fate
version: 2.0.0-beta
labels: []
roles:
- guest
- host
parameters:
data_num:
type: ConstrainedNumberMeta
default:
optional: false
description: data_num
type_meta:
title: ConstrainedNumberMeta
exclusiveMinimum: 1
type: integer
partition:
type: ConstrainedNumberMeta
default:
optional: false
description: data_partition
type_meta:
title: ConstrainedNumberMeta
exclusiveMinimum: 1
type: integer
input_artifacts:
data: {}
model: {}
output_artifacts:
data:
output_data:
types:
- dataframe
optional: false
stages:
- default
roles:
- guest
- host
description: ''
is_multi: false
model:
json_model_output:
types:
- json_model
optional: false
stages:
- default
roles:
- guest
- host
description: ''
is_multi: false
metric:
metric:
types:
- json_metric
optional: false
stages:
- default
roles:
- guest
- host
description: metric, invisible for user
is_multi: false
schema_version: v1

0 comments on commit 621a2a0

Please sign in to comment.