Skip to content

Commit

Permalink
feat (notebook): Remove full repr print of results
Browse files Browse the repository at this point in the history
Now that results includes data from intermediate steps, only print metrics key,
if it exists.  Full data is often a massive, massive list/array
  • Loading branch information
Jacob-Stevens-Haas committed Jun 10, 2024
1 parent 15fdafc commit 7711e6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mitosis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ def _run_in_notebook(
f" curr_result = step_{order}(**resolved_args_{order})\n"
f"with open(r'{trials_folder / (f'results_{order}.dill')}', 'wb') as f:\n" # noqa E501
f" dill.dump(curr_result, f)\n"
f"print(repr(curr_result))\n"
f"try:\n"
f" print(curr_result['metrics'])\n"
f"except KeyError:\n"
f" pass\n"
f"inputs = curr_result.get('data', None)\n"
)
step_runner_cells.append(nbformat.v4.new_code_cell(source=code))
Expand Down

0 comments on commit 7711e6e

Please sign in to comment.