Skip to content

Commit

Permalink
add formatter to unlimit output length; comment out image generation …
Browse files Browse the repository at this point in the history
…- we are not really using it and is quite large
  • Loading branch information
mwdchang committed Aug 20, 2024
1 parent 41aec03 commit 355f16e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
from mira.modeling.amr.stockflow import template_model_to_stockflow_json
from mira.modeling.amr.regnet import template_model_to_regnet_json

format_dict, md_dict = InteractiveShell.instance().display_formatter.format(GraphicalModel.for_jupyter(model))
import IPython
formatter = IPython.get_ipython().display_formatter.formatters['text/plain']
formatter.max_seq_length = 0

# format_dict, md_dict = InteractiveShell.instance().display_formatter.format(GraphicalModel.for_jupyter(model))

if "{{ schema_name }}" == "regnet":
model_json = template_model_to_regnet_json({{ var_name|default("model") }})
Expand All @@ -16,8 +20,8 @@
result = {
"application/json": model_json
}
for key, value in format_dict.items():
if "image" in key:
result[key] = value
# for key, value in format_dict.items():
# if "image" in key:
# result[key] = value

result

0 comments on commit 355f16e

Please sign in to comment.