Skip to content

Commit 7fb91fe

Browse files
committed
Fix oversight in variable refactor: update dataset_registry in pipeline file
1 parent 816580a commit 7fb91fe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

backend/app/services/pipeline_registry.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,16 @@ def _find_dataset_id(self, pipeline_file_path: str) -> str:
125125
rel_path_from_cwd = os.path.relpath(abs_path, cwd)
126126

127127
# 尝试从DatasetRegistry中查找
128-
from app.services.dataset_registry import _DATASET_REGISTRY
129-
ds_registry = _DATASET_REGISTRY
130128

131129
# 1. 尝试通过路径匹配
132-
all_datasets = ds_registry.list()
130+
all_datasets = container.dataset_registry.list()
133131
for ds in all_datasets:
134132
if ds.get("root") == rel_path_from_cwd:
135133
return ds.get("id")
136134

137135
# 2. 如果没找到,尝试计算ID查找 (作为备选)
138136
ds_id = hashlib.md5(rel_path_from_cwd.encode("utf-8")).hexdigest()[:10]
139-
if ds_registry.get(ds_id):
137+
if container.dataset_registry.get(ds_id):
140138
return ds_id
141139

142140
except Exception as e:

0 commit comments

Comments
 (0)