diff --git a/notebooks/Hackathon Scenario 1.ipynb b/notebooks/Hackathon Scenario 1.ipynb index 7239d2275..3b6a2dce2 100644 --- a/notebooks/Hackathon Scenario 1.ipynb +++ b/notebooks/Hackathon Scenario 1.ipynb @@ -2628,7 +2628,7 @@ } ], "source": [ - "print(tc.model_comparison.json(indent=1))" + "print(tc.model_comparison.model_dump_json(indent=1))" ] }, { @@ -4710,7 +4710,7 @@ } ], "source": [ - "print(tc.model_comparison.json(indent=1))" + "print(tc.model_comparison.model_dump_json(indent=1))" ] }, { @@ -4721,7 +4721,7 @@ "outputs": [], "source": [ "with open('mira_comparison_threeway.json', 'w') as fh:\n", - " fh.write(tc.model_comparison.json(indent=1))" + " fh.write(tc.model_comparison.model_dump_json(indent=1))" ] }, { @@ -4779,7 +4779,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/notebooks/Hackathon Scenario 4.ipynb b/notebooks/Hackathon Scenario 4.ipynb index 3a3b9e0a0..92001f0a8 100644 --- a/notebooks/Hackathon Scenario 4.ipynb +++ b/notebooks/Hackathon Scenario 4.ipynb @@ -74,7 +74,7 @@ "outputs": [], "source": [ "with open('mira_comparison_scenario4.json', 'w') as fh:\n", - " fh.write(tc.model_comparison.json(indent=1))" + " fh.write(tc.model_comparison.model_dump_json(indent=1))" ] }, { diff --git a/notebooks/evaluation_2023.01/Scenario2.ipynb b/notebooks/evaluation_2023.01/Scenario2.ipynb index 55aa154fb..35e781f4c 100644 --- a/notebooks/evaluation_2023.01/Scenario2.ipynb +++ b/notebooks/evaluation_2023.01/Scenario2.ipynb @@ -456,7 +456,7 @@ "outputs": [], "source": [ "with open('scenario2_model_comparison.json', 'w') as fh:\n", - " fh.write(tc.model_comparison.json(indent=1))" + " fh.write(tc.model_comparison.model_dump_json(indent=1))" ] } ], diff --git a/notebooks/evaluation_2023.01/Scenario3.ipynb b/notebooks/evaluation_2023.01/Scenario3.ipynb index e58863ad3..d0c70b703 100644 --- a/notebooks/evaluation_2023.01/Scenario3.ipynb +++ b/notebooks/evaluation_2023.01/Scenario3.ipynb @@ -285,9 +285,9 @@ " model.to_json_file(mname, indent=1)\n", "# Also dump the mira model jsons\n", "with open(\"scenario3_biomd958_mira.json\", \"w\") as f:\n", - " f.write(model_958.json(indent=1))\n", + " f.write(model_958.model_dump_json(indent=1))\n", "with open(\"scenario3_biomd960_mira.json\", \"w\") as f:\n", - " f.write(model_960.json(indent=1))" + " f.write(model_960.model_dump_json(indent=1))" ] }, { @@ -534,12 +534,12 @@ "source": [ "import json\n", "res = {\n", - " 'graph_comparison_data': json.loads(mc.model_comparison.json()),\n", + " 'graph_comparison_data': json.loads(mc.model_comparison.model_dump_json()),\n", " 'similarity_scores': mc.model_comparison.get_similarity_scores(),\n", " 'model_names': model_names\n", "}\n", "res_filtered = {\n", - " 'graph_comparison_data': json.loads(mc_filtered.model_comparison.json()),\n", + " 'graph_comparison_data': json.loads(mc_filtered.model_comparison.model_dump_json()),\n", " 'similarity_scores': mc_filtered.model_comparison.get_similarity_scores(),\n", " 'model_names': model_names_filtered\n", "}" diff --git a/notebooks/model_api.ipynb b/notebooks/model_api.ipynb index 87d293663..386c28730 100644 --- a/notebooks/model_api.ipynb +++ b/notebooks/model_api.ipynb @@ -45,7 +45,7 @@ "natural_conversion = NaturalConversion(subject=infected, outcome=immune)\n", "sir_template_model = TemplateModel(templates=[controlled_conversion, natural_conversion])\n", "sir_template_model_dict = sir_template_model.m()\n", - "print(sir_template_model.json())" + "print(sir_template_model.model_dump_json())" ] }, { diff --git a/notebooks/scenarios_2024.08/eval_202301_scenario2.ipynb b/notebooks/scenarios_2024.08/eval_202301_scenario2.ipynb index 97ff219b9..f577fe3ba 100644 --- a/notebooks/scenarios_2024.08/eval_202301_scenario2.ipynb +++ b/notebooks/scenarios_2024.08/eval_202301_scenario2.ipynb @@ -431,7 +431,7 @@ "outputs": [], "source": [ "with open('eval_202301_scenario2_sidarthe_v_model_comparison.json', 'w') as fh:\n", - " fh.write(tc.model_comparison.json(indent=1))" + " fh.write(tc.model_comparison.model_dump_json(indent=1))" ] } ], @@ -451,7 +451,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.10.12" } }, "nbformat": 4,