Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize interface for TA4 integration (#204)
* Optimize TA4 interface * Update interfaces.py * Change setup to fix MIRA name error (#205) (#206) * changed mira version before bug * fix error Co-authored-by: Sam Witty <[email protected]> * Update demo notebook * Update demo.ipynb * Update MIRA loading (#209) * Change setup to fix MIRA name error (#205) * changed mira version before bug * fix error * Add utilities for loading distributions from AMR (#200) * added mira distribution loading * added normal distribution * fixed Normal2 and Normal3 * nit * added minimal mira_distribution_to_pyro test --------- Co-authored-by: Sam Witty <[email protected]> * Updated interface with string inputs for QOI * Interface to optimize after calibrating * Update demo.ipynb * Update sample csv file to avoid merge conflicts * Updating file to avoid merge conflict with main * Updating from main to fix model loading errors (#211) * Change setup to fix MIRA name error (#205) * changed mira version before bug * fix error * Add utilities for loading distributions from AMR (#200) * added mira distribution loading * added normal distribution * fixed Normal2 and Normal3 * nit * added minimal mira_distribution_to_pyro test * Symbolic Rate law to Pytorch Rate law (#201) * I believe I wrote the correct code, based on experiments in the notebook. Will test next. * FAILED test/test_mira/test_rate_law.py::TestRateLaw::test_rate_law_compilation - AttributeError: 'ScaledBetaNoisePetriNetODESystem' object has no attribute 'beta' * Added Symbolic_Deriv_Experiments notebook * Something weird is happening. I can confirm that 'beta' is an attribute of ScaledBetaNoisePetriNetODESystem after setting up the model, but then it can't be found at sample time * Clarified the bug in the Symbolic derivatives notebook * Expected and actual derivative match * Time varying parameter rate law correctly read * Thought we added this already * Added kwargs to from_askenet and from_mira and compile_rate_law_p to load_petri_net * Blocked on gyorilab/mira#189 but tests pass by making compile_rate_law_p False by default * Removed unnecessary pygraphviz dependency * Unit test to fail when concept name does not equal rate law symbols * All tests pass with default compile_rate_law_p = False * Merged from main. removed dependency on older version of mira * point mira to the github repo main branch * point mira to the github repo main branch * load_and_calibrate_and_sample(..., compile_rate_law_p=True) works with the caveat that the ScaledBetaNoisePetriNetODESystem solution was returning very slightly negative values, so I set mean = torch.abs(solution[var_name]) to address the issue * merged changes to MiraPetriNetODESystem and ScaledBetaNoisePetriNetODESystem from main. ScaledBetaNoisePetriNetODESystem has default compiled_rate_law_p=True * observation_function for ScaledBetaNoisePetriNetODESystem now uses torch.maximum(solution[var_name], torch.tensor(1e-9)) to deal with overshooting derivatives * aggregate parameters is now by default opt-out, and AMR models with multiple parameters per transition can be interpreted using compile_rate_law --------- Co-authored-by: Sam Witty <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]> * Update notebooks to avoid merge conflicts * Update NB to resolve conflicts * Update from main to avoid conflicts (#212) * Change setup to fix MIRA name error (#205) * changed mira version before bug * fix error * Add utilities for loading distributions from AMR (#200) * added mira distribution loading * added normal distribution * fixed Normal2 and Normal3 * nit * added minimal mira_distribution_to_pyro test * Symbolic Rate law to Pytorch Rate law (#201) * I believe I wrote the correct code, based on experiments in the notebook. Will test next. * FAILED test/test_mira/test_rate_law.py::TestRateLaw::test_rate_law_compilation - AttributeError: 'ScaledBetaNoisePetriNetODESystem' object has no attribute 'beta' * Added Symbolic_Deriv_Experiments notebook * Something weird is happening. I can confirm that 'beta' is an attribute of ScaledBetaNoisePetriNetODESystem after setting up the model, but then it can't be found at sample time * Clarified the bug in the Symbolic derivatives notebook * Expected and actual derivative match * Time varying parameter rate law correctly read * Thought we added this already * Added kwargs to from_askenet and from_mira and compile_rate_law_p to load_petri_net * Blocked on gyorilab/mira#189 but tests pass by making compile_rate_law_p False by default * Removed unnecessary pygraphviz dependency * Unit test to fail when concept name does not equal rate law symbols * All tests pass with default compile_rate_law_p = False * Merged from main. removed dependency on older version of mira * point mira to the github repo main branch * point mira to the github repo main branch * load_and_calibrate_and_sample(..., compile_rate_law_p=True) works with the caveat that the ScaledBetaNoisePetriNetODESystem solution was returning very slightly negative values, so I set mean = torch.abs(solution[var_name]) to address the issue * merged changes to MiraPetriNetODESystem and ScaledBetaNoisePetriNetODESystem from main. ScaledBetaNoisePetriNetODESystem has default compiled_rate_law_p=True * observation_function for ScaledBetaNoisePetriNetODESystem now uses torch.maximum(solution[var_name], torch.tensor(1e-9)) to deal with overshooting derivatives * aggregate parameters is now by default opt-out, and AMR models with multiple parameters per transition can be interpreted using compile_rate_law * 12-Month Hackathon Notebooks (#207) * started hackathon prep scenario notebooks * more on hackathon scenarios * more work on hackathon notebooks * created AMR for scenario1 with constant beta * Vs hackathon prep (#203) * beginning of ensemble challenge ipynb * Update ensemble_challenge.ipynb * added to scenario2 notebook, ready for scenario3 * added to scenario2 notebook, ready for scenario3 * Update scenario1.ipynb * Update scenario1 * changes to scenario3, and new AMR * pre-hackathon prep update - scenario1 task 1 almost done (pending AMR changes) - ensemble challenge layout started * more on scenario notebooks, added AMR to scenario2 * Fixed the nan inside the intervened parameters column output * updates to scenario3 notebook * merged from main --------- Co-authored-by: vsella <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]> --------- Co-authored-by: Sam Witty <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]> Co-authored-by: sabinala <[email protected]> Co-authored-by: vsella <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]> * Update demo.ipynb * Update demo.ipynb * updated demo with new MIRA model * Fixed setup.cfg * Update demo.ipynb * Updated solution key in demo * finished demo notebook run * Added test for samples obtained after OUU * Update output format and description * Fixed mira on setup to help pass tests * Added `self.intervened_samples` to `test_ode_interfaces' --------- Co-authored-by: Sam Witty <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]> Co-authored-by: sabinala <[email protected]> Co-authored-by: vsella <[email protected]> Co-authored-by: Jeremy Zucker <[email protected]>
- Loading branch information