Skip to content

Commit a691469

Browse files
committed
feat: use root_dir
1 parent 2c4b4b6 commit a691469

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/dataset/excel.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import os
2+
from pathlib import Path
23

34
from dingo.config import InputArgs
45
from dingo.exec import Executor
56

67
if __name__ == '__main__':
8+
# 获取项目根目录
9+
root_dir = Path(__file__).parent.parent.parent
710
input_data = {
8-
"input_path": "../../test/data/test_local_excel.xlsx",
11+
"input_path": str(root_dir / "test/data/test_local_excel.xlsx"),
912
"dataset": {
1013
"source": "local",
1114
"format": "excel",

0 commit comments

Comments
 (0)