Skip to content

Commit 3c1b8cf

Browse files
committed
Fix workflows with the same steps colliding
1 parent 00366e9 commit 3c1b8cf

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/wei/experiment_client.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,22 @@ def _extract_files_from_workflow(
210210
if str(path).startswith("payload."):
211211
try:
212212
try:
213-
files[file] = payload[str(path).split(".")[1]]
213+
files[f"{step.id}_{file}"] = payload[
214+
str(path).split(".")[1]
215+
]
214216
except KeyError:
215-
files[file] = payload[path]
217+
files[f"{step.id}_{file}"] = payload[path]
216218
except KeyError as e:
217219
raise KeyError(
218220
f"File '{file}' looks like a payload entry, but payload does not contain {path}"
219221
) from e
220222
else:
221-
files[file] = path
222-
if not Path(files[file]).is_absolute():
223-
files[file] = self.working_dir / files[file]
224-
step.files[file] = Path(files[file]).name
223+
files[f"{step.id}_{file}"] = path
224+
if not Path(files[f"{step.id}_{file}"]).is_absolute():
225+
files[f"{step.id}_{file}"] = (
226+
self.working_dir / files[f"{step.id}_{file}"]
227+
)
228+
step.files[file] = Path(files[f"{step.id}_{file}"]).name
225229
return files
226230

227231
def _log_event(

0 commit comments

Comments
 (0)