Skip to content

Commit

Permalink
Support for regulatory networks (#404)
Browse files Browse the repository at this point in the history
* add support for regnet now that mira has been fixed

* lint

* uncomment other mistakenly commented tests

* swap out dict access for explicit iteration

* lint
  • Loading branch information
SamWitty authored Nov 2, 2023
1 parent c5eaaac commit 6c6d8ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pyciemss/mira_integration/compiled_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ def _compile_initial_state_mira(
src: mira.modeling.Model,
) -> Callable[..., Tuple[torch.Tensor]]:
symbolic_initials = {
get_name(var): src.template_model.initials[get_name(var)].expression.args[0]
for var in src.variables.values()
get_name(var): var.data["expression"].args[0] for var in src.variables.values()
}
numeric_initial_state_func = sympytorch.SymPyModule(
expressions=[symbolic_initials[get_name(var)] for var in src.variables.values()]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license_files = LICENSE
install_requires =
jupyter
torch >= 1.8.0
mira @ git+https://github.com/indralab/[email protected].0
mira @ git+https://github.com/indralab/[email protected].1
chirho @ git+https://github.com/BasisResearch/chirho@f3019d4b22f4e49261efbf8da90a30095af2afbc
sympytorch
torchdiffeq
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
]

REGNET_URLS = [
# "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/main/regnet/examples/lotka_volterra.json",
"https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/main/regnet/examples/lotka_volterra.json",
# "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/main/regnet/examples/syntax_edge_cases.json",
]

Expand Down

0 comments on commit 6c6d8ee

Please sign in to comment.