Skip to content

Commit 05b26a2

Browse files
authored
feature: 更新算子名称;增加创建任务、模板校验 (#57)
* feature: 更新算子名称;增加创建任务、模板校验 * feature: 镜像构建增加缓存
1 parent 6917ae5 commit 05b26a2

File tree

16 files changed

+56
-40
lines changed

16 files changed

+56
-40
lines changed

backend/services/data-cleaning-service/src/main/java/com/datamate/cleaning/infrastructure/validator/CleanTaskValidator.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,26 @@
1717
public class CleanTaskValidator {
1818
private final CleaningTaskRepository cleaningTaskRepo;
1919

20-
public void checkNameDuplication (String name) {
20+
public void checkNameDuplication(String name) {
2121
if (cleaningTaskRepo.isNameExist(name)) {
2222
throw BusinessException.of(CleanErrorCode.DUPLICATE_TASK_NAME);
2323
}
2424
}
2525

26-
public void checkInputAndOutput (List<OperatorInstanceDto> operators) {
26+
public void checkInputAndOutput(List<OperatorInstanceDto> operators) {
2727
if (operators == null || operators.size() <= 1) {
2828
return;
2929
}
3030
for (int i = 1; i < operators.size(); i++) {
3131
OperatorInstanceDto front = operators.get(i - 1);
3232
OperatorInstanceDto back = operators.get(i);
33-
if (!StringUtils.equals(front.getOutputs(), back.getInputs())) {
34-
throw BusinessException.of(CleanErrorCode.IN_AND_OUT_NOT_MATCH,
35-
String.format(Locale.ROOT, "ops(name: [%s, %s]) inputs and outputs does not match",
36-
front.getName(), back.getName()));
33+
if (StringUtils.equals(front.getOutputs(), back.getInputs()) || StringUtils.equalsAny("multimodal",
34+
front.getOutputs(), back.getOutputs())) {
35+
continue;
3736
}
37+
throw BusinessException.of(CleanErrorCode.IN_AND_OUT_NOT_MATCH,
38+
String.format(Locale.ROOT, "ops(name: [%s, %s]) inputs and outputs does not match",
39+
front.getName(), back.getName()));
3840
}
3941
}
4042
}

deployment/helm/datamate/charts/backend/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- toYaml . | nindent 12 }}
4040
{{- end }}
4141
image: "{{ include "backend.image" . }}"
42-
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }}
42+
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
4343
ports:
4444
- name: http
4545
containerPort: {{ .Values.service.port }}

deployment/helm/datamate/charts/database/templates/_helpers.tpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,5 @@ Name of image
6767
{{- define "database.image" -}}
6868
{{- $name := default .Values.image.repository .Values.global.image.database.name }}
6969
{{- $tag := default .Values.image.tag .Values.global.image.database.tag }}
70-
{{- if .Values.global.image.repository }}
71-
{{- .Values.global.image.repository | trimSuffix "/" }}/{{ $name }}:{{ $tag }}
72-
{{- else }}
7370
{{- $name }}:{{ $tag }}
7471
{{- end }}
75-
{{- end }}

deployment/helm/datamate/charts/database/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
{{- toYaml . | nindent 12 }}
6262
{{- end }}
6363
image: "{{ include "database.image" . }}"
64-
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }}
64+
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
6565
ports:
6666
- name: http
6767
containerPort: {{ .Values.service.port }}

deployment/helm/datamate/charts/frontend/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
{{- toYaml . | nindent 12 }}
4141
{{- end }}
4242
image: "{{ include "frontend.image" . }}"
43-
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }}
43+
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
4444
ports:
4545
- name: http
4646
containerPort: {{ .Values.service.port }}

deployment/helm/datamate/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Declare variables to be passed into your templates.
44

55
global:
6+
deerFlow:
7+
enable: false
68
image:
79
repository: ""
810
pullPolicy: "IfNotPresent"

deployment/helm/deer-flow/charts/backend/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- toYaml . | nindent 12 }}
4040
{{- end }}
4141
image: "{{ include "backend.image" . }}"
42-
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }}
42+
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
4343
ports:
4444
- name: http
4545
containerPort: {{ .Values.service.port }}

deployment/helm/deer-flow/charts/frontend/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- toYaml . | nindent 12 }}
4040
{{- end }}
4141
image: "{{ include "frontend.image" . }}"
42-
imagePullPolicy: {{ default .Values.global.image.pullPolicy .Values.image.pullPolicy }}
42+
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.global.image.pullPolicy }}
4343
ports:
4444
- name: http
4545
containerPort: {{ .Values.service.port }}

runtime/ops/formatter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _import_operators():
2121
from . import file_exporter
2222
from . import slide_formatter
2323
from . import unstructured_formatter
24-
from . import external_pdf_formatter
24+
from . import mineru_formatter
2525

2626

2727
_import_operators()

runtime/ops/formatter/external_pdf_formatter/__init__.py renamed to runtime/ops/formatter/mineru_formatter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
from datamate.core.base_op import OPERATORS
44

5-
OPERATORS.register_module(module_name='ExternalPDFFormatter',
5+
OPERATORS.register_module(module_name='MineruFormatter',
66
module_path="ops.formatter.external_pdf_formatter.process")

0 commit comments

Comments
 (0)