Skip to content

Commit fc9fb07

Browse files
authored
bugfix (#164)
1 parent ec87e4f commit fc9fb07

File tree

4 files changed

+54
-11
lines changed

4 files changed

+54
-11
lines changed

README-zh.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Choose a deployment method:
4242
Enter choice:
4343
```
4444

45-
在运行 `make uninstall` 时,卸载流程会只询问一次是否删除卷(数据),该选择会应用到所有组件。卸载顺序为:milvus -> label-studio -> datamate,确保在移除 datamate 网络前,所有使用该网络的服务已先停止。
46-
4745
### 拉取代码
4846

4947
```bash
@@ -56,6 +54,20 @@ cd DataMate
5654
```bash
5755
make install
5856
```
57+
58+
若您使用的机器没有make,请执行如下命令部署:
59+
```bash
60+
# Windows
61+
set REGISTRY=ghcr.io/modelengine-group/
62+
docker compose -f ./deployment/docker/datamate/docker-compose.yml up -d
63+
docker compose -f ./deployment/docker/milvus/docker-compose.yml up -d
64+
65+
# Linux/Mac
66+
export REGISTRY=ghcr.io/modelengine-group/
67+
docker compose -f ./deployment/docker/datamate/docker-compose.yml up -d
68+
docker compose -f ./deployment/docker/milvus/docker-compose.yml up -d
69+
```
70+
5971
当容器运行后,请在浏览器打开 http://localhost:30000 查看前端界面。
6072

6173
要查看所有可用的 Make 目标、选项和帮助信息,请运行:
@@ -82,6 +94,13 @@ make build
8294
make install dev=true
8395
```
8496

97+
### 卸载服务
98+
```bash
99+
make uninstall
100+
```
101+
102+
在运行 `make uninstall` 时,卸载流程会只询问一次是否删除卷(数据),该选择会应用到所有组件。卸载顺序为:milvus -> label-studio -> datamate,确保在移除 datamate 网络前,所有使用该网络的服务已先停止。
103+
85104
## 🤝 贡献指南
86105

87106
感谢您对本项目的关注!我们非常欢迎社区的贡献,无论是提交 Bug 报告、提出功能建议,还是直接参与代码开发,都能帮助项目变得更好。

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ Choose a deployment method:
4545
Enter choice:
4646
```
4747

48-
When running make uninstall, the installer will prompt once whether to delete volumes; that single choice is applied to all components. The uninstall order is: milvus -> label-studio -> datamate, which ensures the datamate network is removed cleanly after services that use it have stopped.
49-
5048
### Clone the Code
5149

5250
```bash
@@ -59,6 +57,20 @@ cd DataMate
5957
```bash
6058
make install
6159
```
60+
61+
If the machine you are using does not have make installed, please run the following command to deploy it:
62+
```bash
63+
# Windows
64+
set REGISTRY=ghcr.io/modelengine-group/
65+
docker compose -f ./deployment/docker/datamate/docker-compose.yml up -d
66+
docker compose -f ./deployment/docker/milvus/docker-compose.yml up -d
67+
68+
# Linux/Mac
69+
export REGISTRY=ghcr.io/modelengine-group/
70+
docker compose -f ./deployment/docker/datamate/docker-compose.yml up -d
71+
docker compose -f ./deployment/docker/milvus/docker-compose.yml up -d
72+
```
73+
6274
Once the container is running, access http://localhost:30000 in a browser to view the front-end interface.
6375

6476
To list all available Make targets, flags and help text, run:
@@ -85,6 +97,13 @@ make build
8597
make install dev=true
8698
```
8799

100+
### Uninstall
101+
```bash
102+
make uninstall
103+
```
104+
105+
When running make uninstall, the installer will prompt once whether to delete volumes; that single choice is applied to all components. The uninstall order is: milvus -> label-studio -> datamate, which ensures the datamate network is removed cleanly after services that use it have stopped.
106+
88107
## 🤝 Contribution Guidelines
89108

90109
Thank you for your interest in this project! We warmly welcome contributions from the community. Whether it's submitting

deployment/docker/datamate/backend-with-deer-flow.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ server {
2323
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2424
}
2525

26+
location /api/evaluation/ {
27+
proxy_pass http://datamate-backend-python:18000/api/evaluation/;
28+
proxy_set_header Host $host;
29+
proxy_set_header X-Real-IP $remote_addr;
30+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31+
}
32+
2633
location /api/ {
2734
proxy_pass http://datamate-backend:8080/api/;
2835
proxy_set_header Host $host;

runtime/python-executor/datamate/core/base_op.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,8 @@ def execute(self, sample: Dict[str, Any]):
456456
new_file_name = base_name + '.' + file_type
457457
sample[self.filename_key] = new_file_name
458458

459-
base_name, _ = os.path.splitext(save_path)
460-
sample[self.filepath_key] = base_name
461-
file_size = os.path.getsize(base_name)
459+
sample[self.filepath_key] = save_path
460+
file_size = os.path.getsize(save_path)
462461
sample[self.filesize_key] = f"{file_size}"
463462

464463
logger.info(f"origin file named {file_name} has been save to {save_path}")
@@ -514,16 +513,15 @@ def get_medicalfile_handler(self, sample: Dict[str, Any]):
514513
return sample, save_path
515514

516515
def save_file(self, sample, save_path):
517-
file_name, _ = os.path.splitext(save_path)
518516
# 以二进制格式保存文件
519517
file_sample = sample[self.text_key].encode('utf-8') if sample[self.text_key] else sample[self.data_key]
520-
with open(file_name, 'wb') as f:
518+
with open(save_path, 'wb') as f:
521519
f.write(file_sample)
522520
# 获取父目录路径
523521

524-
parent_dir = os.path.dirname(file_name)
522+
parent_dir = os.path.dirname(save_path)
525523
os.chmod(parent_dir, 0o770)
526-
os.chmod(file_name, 0o640)
524+
os.chmod(save_path, 0o640)
527525

528526
def _get_from_data(self, sample: Dict[str, Any]) -> Dict[str, Any]:
529527
sample[self.data_key] = bytes(sample[self.data_key])

0 commit comments

Comments
 (0)