Skip to content

Commit c0fd724

Browse files
committed
use enumerate index instead of unavailable cell_id
1 parent 823bc17 commit c0fd724

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jupyter_scheduler/executors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ def execute(self):
145145
if job.parameters:
146146
mlflow.log_params(job.parameters)
147147

148-
for index, cell in enumerate(nb.cells):
148+
for idx, cell in enumerate(nb.cells):
149149
if "tags" in cell.metadata and "mlflow_log" in cell.metadata["tags"]:
150-
mlflow.log_text(cell.source, f"source_cell_{index}.txt")
150+
mlflow.log_text(cell.source, f"source_cell_{idx}.txt")
151151
if cell.cell_type == "code" and cell.outputs:
152152
for output in cell.outputs:
153153
if "text/plain" in output.data:
154154
mlflow.log_text(
155-
output.data["text/plain"], f"output_cell_{cell.cell_id}.txt"
155+
output.data["text/plain"], f"output_cell_{idx}.txt"
156156
)
157157

158158
except CellExecutionError as e:

0 commit comments

Comments
 (0)