Skip to content

Commit

Permalink
fix notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
FFroehlich committed Dec 5, 2024
1 parent 1613aa2 commit 513ca2a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions python/examples/example_jax_petab/ExampleJaxPEtab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,23 +357,20 @@
"simulation_condition = (\"model1_data1\",)\n",
"\n",
"# Load condition-specific data\n",
"ts_preeq, ts_dyn, ts_posteq, my, iys = jax_problem._measurements[\n",
"ts_init, ts_dyn, ts_posteq, my, iys = jax_problem._measurements[\n",
" simulation_condition\n",
"]\n",
"\n",
"# Load parameters for the specified condition\n",
"p = jax_problem.load_parameters(simulation_condition[0])\n",
"# Disable preequilibration\n",
"p_preeq = jnp.array([])\n",
"\n",
"\n",
"# Define a function to compute the gradient with respect to dynamic timepoints\n",
"@eqx.filter_jacfwd\n",
"def grad_ts_dyn(tt):\n",
" return jax_problem.model.simulate_condition(\n",
" p=p,\n",
" p_preeq=p_preeq,\n",
" ts_init=ts_preeq,\n",
" ts_init=ts_init,\n",
" ts_dyn=tt,\n",
" ts_posteq=ts_posteq,\n",
" my=jnp.array(my),\n",
Expand Down

0 comments on commit 513ca2a

Please sign in to comment.