Skip to content

Commit

Permalink
fix compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FFroehlich committed Nov 19, 2024
1 parent 5393e6c commit a22f099
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions python/examples/example_jax_petab/ExampleJaxPEtab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"\n",
"To begin, we will import a model using [PEtab](https://petab.readthedocs.io). For this demonstration, we will utilize the [Benchmark Collection](https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab), which provides a diverse set of models. For more information on importing PEtab models, refer to the corresponding [PEtab notebook](https://amici.readthedocs.io/en/latest/petab.html).\n",
"\n",
"In this tutorial, we will import the Böhm model from the Benchmark Collection. Using [amici.petab_import](https://amici.readthedocs.io/en/latest/generated/amici.petab_import.html#amici.petab_import.import_petab_problem), we will load the PEtab problem. To create a [JAXModel](https://amici.readthedocs.io/en/latest/generated/amici.jax.html#amici.jax.JAXModel) instead of a standard AMICI model, we set the `jax` parameter to `True`. As we won't use the corresponding AMICI model, we set the `compile_` to `False`.\n"
"In this tutorial, we will import the Böhm model from the Benchmark Collection. Using [amici.petab_import](https://amici.readthedocs.io/en/latest/generated/amici.petab_import.html#amici.petab_import.import_petab_problem), we will load the PEtab problem. To create a [JAXModel](https://amici.readthedocs.io/en/latest/generated/amici.jax.html#amici.jax.JAXModel) instead of a standard AMICI model, we set the `jax` parameter to `True`.\n"
]
},
{
Expand Down Expand Up @@ -52,7 +52,7 @@
"# Import the PEtab problem as a JAX-compatible AMICI model\n",
"jax_model = import_petab_problem(\n",
" petab_problem,\n",
" compile_=False, # do not compile regular amici model\n",
" compile_=True, # do not compile regular amici model\n",
" verbose=False, # no text output\n",
" jax=True, # return jax model\n",
")"
Expand Down Expand Up @@ -977,7 +977,10 @@
"\n",
"# Import the PEtab problem as a standard AMICI model\n",
"amici_model = import_petab_problem(\n",
" petab_problem, compile_=True, verbose=False, jax=False\n",
" petab_problem,\n",
" compile_=False, # do not recompile\n",
" verbose=False,\n",
" jax=False, # load the amici model this time\n",
")\n",
"\n",
"# Configure the solver with appropriate tolerances\n",
Expand Down
4 changes: 1 addition & 3 deletions python/sdist/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ line-length = 79
[tool.ruff]
line-length = 79
extend-include = ["*.ipynb"]
exclude = ['jax.template.py']
extend-select = ["UP"]

[tool.ruff.lint]
extend-select = ["B028"]
extend-select = ["B028", "UP"]
ignore = ["E402", "F403", "F405", "E741"]

0 comments on commit a22f099

Please sign in to comment.