Skip to content

Commit 5f3a16f

Browse files
committed
use enumerate index instead of unavailable cell_id
1 parent b08d653 commit 5f3a16f

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
@@ -181,14 +181,14 @@ def create_output_files(self, job: DescribeJob, notebook_node):
181181
if job.parameters:
182182
mlflow.log_params(job.parameters)
183183

184-
for index, cell in enumerate(nb.cells):
184+
for idx, cell in enumerate(nb.cells):
185185
if "tags" in cell.metadata and "mlflow_log" in cell.metadata["tags"]:
186-
mlflow.log_text(cell.source, f"source_cell_{index}.txt")
186+
mlflow.log_text(cell.source, f"source_cell_{idx}.txt")
187187
if cell.cell_type == "code" and cell.outputs:
188188
for output in cell.outputs:
189189
if "text/plain" in output.data:
190190
mlflow.log_text(
191-
output.data["text/plain"], f"output_cell_{cell.cell_id}.txt"
191+
output.data["text/plain"], f"output_cell_{idx}.txt"
192192
)
193193

194194
except CellExecutionError as e:

0 commit comments

Comments
 (0)