-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamical System Multilevel Model Notebook #351
base: master
Are you sure you want to change the base?
Commits on Jun 20, 2023
-
Operations and Handlers for ODE Dynamical Systems (#155)
* initial notebook * initial scaffolding * initial ODE implementation * more progress * untested first pass at point intervention * first successful interruption pass * point intervention working * first pass of observation handler * modified CI * adds tests for noop interventions and interruptions, failing, fixes issue where remaining tspan was expected for unsplit tspans. * converts sir model to reusable fixture, adds todo test for affective point intervention. * adds test of affective single and nested point interventinos. * reduces permutations of a point intervention test. * added stop which seems to help... * recomplicates nested point intervention test parameters to cover additional case. * pseudocode refac to non-recursive approach * adds almost correct non-recursive point interruption thing that hopefully makes dynamic interventions easier to implement, raj todo some things. * untested code implementing slicing and concat * fixed some typos still not tested * finishes refactor from recursive approach and passes some tests * passes current suite of point interruption tests. * adds errors and tests to confirm they throw, one is broken still. * fixed tests * fixed observation, no tests yet * python3.8 type test error fix? Can't reproduce locally so sort of shooting in the dark * added basic observation structure * observation desired interface * addded observation functionality with sample * added intervention to example * some progress on dynamic events, but will refactor to abstract out a simulate_to_next_event effectful operation that keeps all the torchdiffeq idiosyncrasies in one place. * sketches out signatures and a plan (in comments) to refactor interruptions to better support dynamic events and the abstracting away of solver idiosyncrasies * tests for point observations * added tiny epsilon to observation interruption * added error checking for time being equal to any element in full timespan just in case * lint * restructures intervention handling to better abstract solver idiosyncrasies away, preps to implement abstracted torchdiffeq solving. * passes existing tests of point interruptions, preps for torchdiffeq implementation supporting dynamic interruptions. * adds test case to single static intervention ensuring intervention only changes values after its time. * refactors utilities for constructing torchdiffeq event functions. * breaks out todos for double pass solver execution for dynamic event handling. * finishes double solver pass using event function, passes current test suite. * gets dynamic interventions working (at least for a single runtime test case + manual output check) * initial notebook * added synthetic data simulation section * makes first dynamic intervention test actually test something * runs linter * bit hacky way to perform inference but recovers true sir params * puts intervention blocking functionality in the SEL loop, rather than leaving it up to interventions themselves. * added some inference evaluation but need more metrics * switching to manual generation of predictions on observation sites * cleaned up notebook and finished initial evaluation for just demonstrating conditioning functionality * moved tutorial to docs folder * issue with intervention tests not passing * refactors PointObservation to work with SEL refactor. * includes interventions * poisson likelihood breaking for some reason * fixed poisson likelihood issue * test with exit stack works too... * changed observation method to be the same as the test that somehow passes * failing test that reproduces notebook error * reverting noteback back to old version now that we understand why test is breaking * added dynamic intervention to example * adds test of nested dynamic interventions, and noop dynamic interruptions. * added some todos and fixed some typos * modifies svi integration test to avoid issue arising when observation occurs at start of tspan, adds test asserting that an error is explicitly thrown for that case. * runs linter * gets linter mostly happy. * fixes idiosyncratic mypy issues, including meh breakout of dispatchable getitem for trajectory. * quick mypy fix * flake8 changes * added import statement to make notebook work * reran lint * removed scratch notebook --------- Co-authored-by: Sam Witty <[email protected]> Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Andy Zane <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9a1bac6 - Browse repository at this point
Copy the full SHA 9a1bac6View commit details
Commits on Jun 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 79ced27 - Browse repository at this point
Copy the full SHA 79ced27View commit details
Commits on Jun 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 51cfb20 - Browse repository at this point
Copy the full SHA 51cfb20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 501347a - Browse repository at this point
Copy the full SHA 501347aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b20ef1 - Browse repository at this point
Copy the full SHA 8b20ef1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e83ed2 - Browse repository at this point
Copy the full SHA 7e83ed2View commit details
Commits on Jun 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e5040d9 - Browse repository at this point
Copy the full SHA e5040d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for efe8109 - Browse repository at this point
Copy the full SHA efe8109View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e16c9c - Browse repository at this point
Copy the full SHA 1e16c9cView commit details
Commits on Jun 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4384259 - Browse repository at this point
Copy the full SHA 4384259View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9180bce - Browse repository at this point
Copy the full SHA 9180bceView commit details -
Configuration menu - View commit details
-
Copy full SHA for be05d1a - Browse repository at this point
Copy the full SHA be05d1aView commit details
Commits on Jul 12, 2023
-
Update staging-dynamic with renaming from master (#213)
* Add top-level subpackage imports in indexed and interventional modules (#169) * move cf handlers out of init * add imports * Replaces [@ref] Linked References w/ Manual Ref and Bib (#171) * replaces linked refs with manual refs for now due to only highly complex and error prone alternatives available for automation * adds sphinx bibtex to setup for tests * Add broadcasting test cases (#168) * Update code in deep SCM notebook (#134) * start * update code * refs merge * fix json * grammatical fixes, re-applying these changes as the original branch got conflated with something in stash * add plot description * adds link to referenced pyro tutorial --------- Co-authored-by: Andy Zane <[email protected]> * Update text and code of CEVAE notebook (#131) * notebook and fixes * notebook works * temp commit that gives mae=.02 when removing no grad line when generating data * seems to work, verbose loss output * removed loss outputs and fixed some small typos --------- Co-authored-by: Raj Agrawal <[email protected]> * Added CONTRIBUTING.md file (#172) * initial pass that makes small modifications to CONTRIBUTING.md file in pyro * calls lint script instead * fixed to call clean.sh script * replaced with clean script --------- Co-authored-by: Raj Agrawal <[email protected]> * Create publish_docs.yml (#180) * removed old files (#184) Co-authored-by: Raj Agrawal <[email protected]> * Added docstring for intervene following issue #113 (#182) * added docstring for intervene following issue #113 * removed extra spacing * adds docstring for DoMessenger * removes generic type hint on _intervene_atom so that intervene signatures properly show up in docs. --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Andy Zane <[email protected]> * Add a draft logo to replace placeholder (#185) * add a draft logo to replace placeholder * add svg * Update text and code of mediation analysis notebook (#132) * notebook and fixes * notebook works * update notebook * working * revert cevae to master in this branch * pull in changes * fix typo * adds (live, see comment) link to backdoor example, replacing inline TODO * properly uses relative link for backdoor notebook. --------- Co-authored-by: Andy Zane <[email protected]> * Causal Pyro README (#170) * copied and pasted index.rst and auto converted to markdown * reformatted, added table to tutorials and examples, still need to add cites * fixed small spacing typos * added status badge * points readme documentation links to live docs. * making the readme an rst that matches landing page * converted tutorial links * converted back to table format for links * table still messed up * gave up on tables, now a bulleted list for examples * added documentation section * small changes * added back missing bullets * fixed to queried_model * review with Sam for cleaning up readme over a call * fixed typo * small edit --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Andy Zane <[email protected]> * links github rendered readme as getting started page of sphinx docs. (#191) * Fix HTML Outline rendering (#188) * fixed outline rendering * fixes outline links in mediation notebook. * fixes outline and links for backdoor notebook. * fixes outline links in cevae notebook. * fixes slc notebook outline links. * adds outline back into deep scm notebook. * address remaining reference issues, building now with now warnings --------- Co-authored-by: Andy Zane <[email protected]> * Design Notes Concat (#174) * first pass at stitching design notes together into cohesive contributor tutorial. * cleans up local bibs, adds omega citation. * updates mention of omega and predicate conditioning * re-integrates the original point being made at the top of observations.rst * renames things to be less redundant * Change name of package throughout codebase (#192) * code and tests * scripts * remove * code misses * docs * Causal Pyro * causal pyro * lint * Create GitHub Actions workflow for PyPI (#181) * Update setup.py arguments (#193) * Update setup.py args * classifier * Update publish_docs.yml * trigger docs deployment * configure docs * Add requirements.txt for docs workflow (#194) * pandoc * Add observe operation and new condition handler (#175) * Separate observe and condition * Split up files and create observational handlers folder * imports * lint * rename test * add test about commutativity of do and condition * doc * union * fix particle test case * fix bug * chirho * Add path to conf.py for docs workflow (#195) * Refactor counterfactuals to use observe and condition (#176) * Separate observe and condition * Split up files and create observational handlers folder * imports * lint * rename test * add test about commutativity of do and condition * doc * union * Refactor counterfactuals to use observe * appease mypy * Vindex fixes particle errors * update backdoor * update slc * fix particle test case * add cf commutativity test * fix bug * revert slc handler order * add predictive smoke test * nit * elbo * reorder test * Add a stronger infer_discrete test * move notebooks to separate branch * test * chirho * merge fail * Update and re-run example notebooks with new condition (#178) * Update and re-run backdoor and SLC notebooks * deepscm * cevae * import * mediation * merge * update notebooks * merge * merge 2 * toc * populate autodoc * tweak * Restores (via cherry-pick) Notebook Link and Formatting Changes (#205) * fixed outline rendering * fixes outline links in mediation notebook. * fixes outline and links for backdoor notebook. * fixes outline links in cevae notebook. * fixes slc notebook outline links. * adds outline back into deep scm notebook. * address remaining reference issues, building now with now warnings --------- Co-authored-by: Sam Witty <[email protected]> --------- Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Sam Witty <[email protected]> * Fixed symbolic link in tutorial (#206) * fixed symbolic link in tutorial * Revert changes to figure paths * Reverted accidental newline from previous commit * Fix image duplication in intro tutorial (#209) * Fix image duplication * fix the one other warning in the docs build * Bump version to 0.1.0-alpha (#208) * Bump prerelease version to 0.1.0-alpha * Comply with pep440 * update paths * imports * notebook * condition * lint --------- Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 418d950 - Browse repository at this point
Copy the full SHA 418d950View commit details -
Support scalar multi-world counterfactuals in dynamical systems (#214)
* Add top-level subpackage imports in indexed and interventional modules (#169) * move cf handlers out of init * add imports * Replaces [@ref] Linked References w/ Manual Ref and Bib (#171) * replaces linked refs with manual refs for now due to only highly complex and error prone alternatives available for automation * adds sphinx bibtex to setup for tests * Add broadcasting test cases (#168) * Update code in deep SCM notebook (#134) * start * update code * refs merge * fix json * grammatical fixes, re-applying these changes as the original branch got conflated with something in stash * add plot description * adds link to referenced pyro tutorial --------- Co-authored-by: Andy Zane <[email protected]> * Update text and code of CEVAE notebook (#131) * notebook and fixes * notebook works * temp commit that gives mae=.02 when removing no grad line when generating data * seems to work, verbose loss output * removed loss outputs and fixed some small typos --------- Co-authored-by: Raj Agrawal <[email protected]> * Added CONTRIBUTING.md file (#172) * initial pass that makes small modifications to CONTRIBUTING.md file in pyro * calls lint script instead * fixed to call clean.sh script * replaced with clean script --------- Co-authored-by: Raj Agrawal <[email protected]> * Create publish_docs.yml (#180) * removed old files (#184) Co-authored-by: Raj Agrawal <[email protected]> * Added docstring for intervene following issue #113 (#182) * added docstring for intervene following issue #113 * removed extra spacing * adds docstring for DoMessenger * removes generic type hint on _intervene_atom so that intervene signatures properly show up in docs. --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Andy Zane <[email protected]> * Add a draft logo to replace placeholder (#185) * add a draft logo to replace placeholder * add svg * Update text and code of mediation analysis notebook (#132) * notebook and fixes * notebook works * update notebook * working * revert cevae to master in this branch * pull in changes * fix typo * adds (live, see comment) link to backdoor example, replacing inline TODO * properly uses relative link for backdoor notebook. --------- Co-authored-by: Andy Zane <[email protected]> * Causal Pyro README (#170) * copied and pasted index.rst and auto converted to markdown * reformatted, added table to tutorials and examples, still need to add cites * fixed small spacing typos * added status badge * points readme documentation links to live docs. * making the readme an rst that matches landing page * converted tutorial links * converted back to table format for links * table still messed up * gave up on tables, now a bulleted list for examples * added documentation section * small changes * added back missing bullets * fixed to queried_model * review with Sam for cleaning up readme over a call * fixed typo * small edit --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Andy Zane <[email protected]> * links github rendered readme as getting started page of sphinx docs. (#191) * Fix HTML Outline rendering (#188) * fixed outline rendering * fixes outline links in mediation notebook. * fixes outline and links for backdoor notebook. * fixes outline links in cevae notebook. * fixes slc notebook outline links. * adds outline back into deep scm notebook. * address remaining reference issues, building now with now warnings --------- Co-authored-by: Andy Zane <[email protected]> * Design Notes Concat (#174) * first pass at stitching design notes together into cohesive contributor tutorial. * cleans up local bibs, adds omega citation. * updates mention of omega and predicate conditioning * re-integrates the original point being made at the top of observations.rst * renames things to be less redundant * Change name of package throughout codebase (#192) * code and tests * scripts * remove * code misses * docs * Causal Pyro * causal pyro * lint * Create GitHub Actions workflow for PyPI (#181) * Update setup.py arguments (#193) * Update setup.py args * classifier * Update publish_docs.yml * trigger docs deployment * configure docs * Add requirements.txt for docs workflow (#194) * pandoc * Add observe operation and new condition handler (#175) * Separate observe and condition * Split up files and create observational handlers folder * imports * lint * rename test * add test about commutativity of do and condition * doc * union * fix particle test case * fix bug * chirho * Add path to conf.py for docs workflow (#195) * Refactor counterfactuals to use observe and condition (#176) * Separate observe and condition * Split up files and create observational handlers folder * imports * lint * rename test * add test about commutativity of do and condition * doc * union * Refactor counterfactuals to use observe * appease mypy * Vindex fixes particle errors * update backdoor * update slc * fix particle test case * add cf commutativity test * fix bug * revert slc handler order * add predictive smoke test * nit * elbo * reorder test * Add a stronger infer_discrete test * move notebooks to separate branch * test * chirho * merge fail * Update and re-run example notebooks with new condition (#178) * Update and re-run backdoor and SLC notebooks * deepscm * cevae * import * mediation * merge * update notebooks * merge * merge 2 * toc * populate autodoc * tweak * Restores (via cherry-pick) Notebook Link and Formatting Changes (#205) * fixed outline rendering * fixes outline links in mediation notebook. * fixes outline and links for backdoor notebook. * fixes outline links in cevae notebook. * fixes slc notebook outline links. * adds outline back into deep scm notebook. * address remaining reference issues, building now with now warnings --------- Co-authored-by: Sam Witty <[email protected]> --------- Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Sam Witty <[email protected]> * Fixed symbolic link in tutorial (#206) * fixed symbolic link in tutorial * Revert changes to figure paths * Reverted accidental newline from previous commit * Fix image duplication in intro tutorial (#209) * Fix image duplication * fix the one other warning in the docs build * Bump version to 0.1.0-alpha (#208) * Bump prerelease version to 0.1.0-alpha * Comply with pep440 * update paths * imports * notebook * condition * support dynamical counterfactuals on scalar variables * replace tensor with stack * type * lint --------- Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c252667 - Browse repository at this point
Copy the full SHA c252667View commit details -
Merging in Dynamic Demo to Simplify Branching for Parallel Work (#215)
* adds and tests a non-interrupting observation handler * swaps out new handler in performance analysis of observation handler. * recovering params when beta and gamma fixed across all regions * adds batched handler for non interrupting observations, passes equivalency test of logprob and shape. * inference working now, going to refactor and remove out covariates * uncomitted changes * adds auto broadcasting for the vectorized point observation. * adds check to not call to_event on deterministic 'sample' operation * working demo end-to-end * finished pass * finished demo * added uncertainty over intervention assignments * finished notebook run w/ new uncertain interventions * undid some linting to make more readable * lints --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5c9b58f - Browse repository at this point
Copy the full SHA 5c9b58fView commit details -
Cleanup of Performance Improvements for ODE Conditioning (#218)
* removes non vectorized interrupting point observation * cleans up tests of NonInterruptingPointObservation * removes redundant test now that non vectorized non interrupting observation handler is removed. * changes order of point observation in equivalence test to make sure non issue. * lints
Configuration menu - View commit details
-
Copy full SHA for 3d4c049 - Browse repository at this point
Copy the full SHA 3d4c049View commit details
Commits on Jul 13, 2023
-
Fix PyroModule state persistence in simulate (#220)
* Fixes for PyroModule * remove t * add unit test
Configuration menu - View commit details
-
Copy full SHA for 49863b4 - Browse repository at this point
Copy the full SHA 49863b4View commit details
Commits on Jul 17, 2023
-
Test Composition of Dynamic Counterfactual and Observation (#219)
* removes non vectorized interrupting point observation * cleans up tests of NonInterruptingPointObservation * removes redundant test now that non vectorized non interrupting observation handler is removed. * changes order of point observation in equivalence test to make sure non issue. * lints * adds file for handler composition tests. * brokenish sketch of possible composition of counterfactual and dynamic point observation case. * gets hacky poc for dynamical counterfactual query w post intervention noise working * adds trajectory and state getitem support for broadcastable boolean masks, removes .to_event hack in vectorized non interrupting point observation, fails tests due to latter. * modifies tests to reflect requirement of manual shape management * adds shape and inference smoke test composing many dynamical handlers. * lints * adds comment explaining the handler blocking that induces the conditional model.
Configuration menu - View commit details
-
Copy full SHA for f87de61 - Browse repository at this point
Copy the full SHA f87de61View commit details
Commits on Jul 27, 2023
-
Fix Gradient Propagation Through Dynamic Interventions (#227)
* fixes issue where gradients weren't propagating through dynamic interventions. * lints
Configuration menu - View commit details
-
Copy full SHA for 7ef06fc - Browse repository at this point
Copy the full SHA 7ef06fcView commit details
Commits on Jul 31, 2023
-
Added counterfactual example to the demo (#223)
* removes non vectorized interrupting point observation * cleans up tests of NonInterruptingPointObservation * removes redundant test now that non vectorized non interrupting observation handler is removed. * changes order of point observation in equivalence test to make sure non issue. * lints * adds file for handler composition tests. * changed to condition only * brokenish sketch of possible composition of counterfactual and dynamic point observation case. * gets hacky poc for dynamical counterfactual query w post intervention noise working * adding basic structure for counterfactual * adds trajectory and state getitem support for broadcastable boolean masks, removes .to_event hack in vectorized non interrupting point observation, fails tests due to latter. * counterfactual example seems to work, need to clean up notebook * modifies tests to reflect requirement of manual shape management * working cf demo * different times for superspreader * changed cf values * adds shape and inference smoke test composing many dynamical handlers. * lints * adds comment explaining the handler blocking that induces the conditional model. * adjusts counterfactual story to have partially shared noise between worlds based on a screening machine story, still needs updates to text and comments. * gets initial conditions set correctly * adds comment on cf guide --------- Co-authored-by: Andy Zane <[email protected]> Co-authored-by: Raj Agrawal <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ac2e8a - Browse repository at this point
Copy the full SHA 8ac2e8aView commit details
Commits on Aug 31, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 72f7b4e - Browse repository at this point
Copy the full SHA 72f7b4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5c99fa - Browse repository at this point
Copy the full SHA f5c99faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3769a02 - Browse repository at this point
Copy the full SHA 3769a02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8371dce - Browse repository at this point
Copy the full SHA 8371dceView commit details -
Configuration menu - View commit details
-
Copy full SHA for be64bc7 - Browse repository at this point
Copy the full SHA be64bc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31a001b - Browse repository at this point
Copy the full SHA 31a001bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34e5ab0 - Browse repository at this point
Copy the full SHA 34e5ab0View commit details
Commits on Sep 1, 2023
-
fixed test to reflect PyroModule changes (#242)
* fixed test to reflect PyroModule changes * lint
Configuration menu - View commit details
-
Copy full SHA for 5c760dd - Browse repository at this point
Copy the full SHA 5c760ddView commit details
Commits on Sep 21, 2023
-
Merge master into staging-dynamic (#284)
* Add an effect handler for inserting factor statements (#238) * Add a Factors handler for inserting new factors * docs and test * lint * Add a BiasedPreemptions handler (#239) * Add BiasedPreemptions handler * test and tiny refactoring * updated copywrite (#254) * pin sphinx version to 7.1.2 to fix docs building (#256) * pin sphinx version to 7.1.2 fixes doc building locally * remove pypandoc * Update requirements.txt * Update setup.py * pin sphinx_rtd_theme==1.3.0 to fix docs deployment (#262) * Fix inference in backdoor adjustment example (#258) * Fix inference in backdoor adjustment example * text and matching ci * typo * device --------- Co-authored-by: Sam Witty <[email protected]> * Fixed typo (#267) * changed headers for examples to be consistent (#271) * Make tutorial run end to end (#274) * Eli's data type and condition fixes * convert to floats and convert to ints when indexing * clean up --------- Co-authored-by: Raj Agrawal <[email protected]> * Single-Cell RNA Seq Example (#265) * data processing code * model doesnt compile yet * fixed dimensions but module naming issue * before switching to interaction version of model * presentation w/ alvin * cleaned up summary stats section and focus on one drug * before switching to multiworld for ate * eli shape corrections * uncomitted changes w/ eli re. shapes * eli's fix of counterfactual * clean up * rewording * change of notation and reran notebook * removed old sentence * fixed typo * removed some masking and redundancy * made dropout a function of confounders too * Ra aq scrna (#263) * Add an effect handler for inserting factor statements (#238) * Add a Factors handler for inserting new factors * docs and test * lint * Add a BiasedPreemptions handler (#239) * Add BiasedPreemptions handler * test and tiny refactoring * updated copywrite (#254) * pin sphinx version to 7.1.2 to fix docs building (#256) * pin sphinx version to 7.1.2 fixes doc building locally * remove pypandoc * Update requirements.txt * Update setup.py * pin sphinx_rtd_theme==1.3.0 to fix docs deployment (#262) * 1. add preprocessing method for expression normalization 2. test more HDAC drugs 3. reproduce raj results * add pseudobulk comparison * add T>0 for theta_drug; clean up notebook for one drug with high IC50 * change T>0 to T for theta_drug; did a bunch of experiments for library size, not improved yet * use corrected gene expression for ate estimation * replace the likelihood to Poisson; it seems working for HDACi --------- Co-authored-by: eb8680 <[email protected]> Co-authored-by: Sam Witty <[email protected]> * cleaned up notebook and fixed some bugs * fixed some bugs and cleaned up references and some notation * fixed drug typo and removed treatment mask * query models, add latent factor per cell * removed old file, did not finish running on all genes so moving to gcp * cleaned up some more text * target genes specified, kernel crashes on last fig * fixed missing ref * reducted num samples to fix memory issue * fixed typo * updated target genes w/ chip targets and fixed plotting bug * added alvins descriptions + some rewriting * fixed some typos * added pca discussion * forgot to save when committing * fixed typo --------- Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Alvin Qin <[email protected]> Co-authored-by: eb8680 <[email protected]> Co-authored-by: Sam Witty <[email protected]> * Document counterfactual operations and handlers (#275) * counterfactual ops docs * typo * minor edits * lint * more linting * docs for BaseCounterfactualMessenger * docs for SingleWorldCounterfactual * a bit more detail about marginal distributions * lint and minor edits * added example usage for counterfactual handlers * docs for multiworld counterfactual * added pass of TwinWorldCounterfactual documentation * Add RNAseq example to readme and docs (#277) * Add RNAseq example to readme and docs * fix header level * Fix docstring propagation in counterfactual ops (#278) * Fix docstring propagation in counterfactual ops * lint * Fix TOC link for single RNA seq example notebook (#280) * fix toc link * fixed toc and equation rendering issues --------- Co-authored-by: Raj Agrawal <[email protected]> * Bump version to 0.1.0 (#279) * Adding undo_split and a test thereof (+small lint) (#264) * added undo_split and a test thereof (+small lint) * moved undo_split, added a test * unlinting counterfactual * unlinting ops * parametrize test WIP * parametrizing test WIP * reverting linting on test_internals.p * isort fix on test_internals.py * parametrizing test WIP * linting WIP * tests linted * cleanup * removed implicit Optional * isort/lint test_internals.py * reverting test_internals to orginal * black linted no -l 120, to prevent github check failure * make lint, make format * format * fix multi-antecedent case and format * remove obsolete comments * appease flake8 * add to sphinx --------- Co-authored-by: Eli <[email protected]> * Replace Preemptions handler implementation (#250) * Replace Preemptions implementation with BiasedPreemption * format * remove nondeterministic default behavior for preempt * address comments * Ru consequent differs (#268) * added undo_split and a test thereof (+small lint) * moved undo_split, added a test * unlinting counterfactual * unlinting ops * parametrize test WIP * parametrizing test WIP * reverting linting on test_internals.p * isort fix on test_internals.py * parametrizing test WIP * linting WIP * tests linted * cleanup * removed implicit Optional * isort/lint test_internals.py * setting up consequent differs for pr * reverting test_internals.py to original * reverting test_internals to orginal * consequent_differs WIP * consequent differs WIP * consequent differs WIP * consequent_differs in explanation, docstring * added consequent_differs and a test for it * black linted no -l 120, to prevent github check failure * lint * make lint, make format * make lint, make format * format * fix multi-antecedent case and format * remove obsolete comments * appease flake8 * add to sphinx * fix event_dim>0 in tests --------- Co-authored-by: Eli <[email protected]> --------- Co-authored-by: eb8680 <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Raj Agrawal <[email protected]> Co-authored-by: Alvin Qin <[email protected]> Co-authored-by: rfl-urbaniak <[email protected]> Co-authored-by: Eli <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f91bbb0 - Browse repository at this point
Copy the full SHA f91bbb0View commit details
Commits on Sep 24, 2023
-
Refactor dynamical module file structure to be consistent with other …
…modules (#286) * factored out generic Dynamics class from ODEDynamics and moved torchdiffeq specific implementations out of ODEDynamics class * update dynamics test imports * moved non user-facing objects and operations to internals.py * split out operations, handlers, and internals * moved around ODE operations and handlers * lint * lint again
Configuration menu - View commit details
-
Copy full SHA for 1985684 - Browse repository at this point
Copy the full SHA 1985684View commit details
Commits on Sep 26, 2023
-
Decouple ODEDynamics class from TorchDiffEq (#290)
* factored out generic Dynamics class from ODEDynamics and moved torchdiffeq specific implementations out of ODEDynamics class * update dynamics test imports * moved non user-facing objects and operations to internals.py * split out operations, handlers, and internals * moved around ODE operations and handlers * lint * lint again * separated effectful operations into hidden dispatch * change kwargs in test to args * added note * separated out TorchDiffEq Backend * tidy up tests * remove comment * lint * lint * added options to TorchDiffEqBackend * moved handlers.py into folder * add files to __init__.py for handlers * lint * seperated interruptions from simulator event loop * added placeholder BackendHandler class * added BackendHandler and edited tests accordingly * lint * lint again * remove unnecessary type check * renamed backend to solver throughout * moved functionality out of __init__.py * updated and reran notebook * lingering test without solver kwarg. Probably isn't used anywhere? * missing import
Configuration menu - View commit details
-
Copy full SHA for e3f4ce0 - Browse repository at this point
Copy the full SHA e3f4ce0View commit details
Commits on Sep 27, 2023
-
Consolidate
Backend
andSolverHandler
into a singleSolver
effe……ct handler / dispatch mechanism (#292) * replaced ODEBackend with ODESolver * lingering renaming of Backend to Solver and removal of unnecessary Solver handler * typo in notebook * remove dupliace Solver * dummy commit to trigger linting? * fixed lint error --------- Co-authored-by: Raj Agrawal <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c015a12 - Browse repository at this point
Copy the full SHA c015a12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d1dc67 - Browse repository at this point
Copy the full SHA 7d1dc67View commit details
Commits on Oct 3, 2023
-
Decouple
SimulatorEventLoop
from concatenation of trajectories (#293)* initial scaffolding * remove unnecessary TypeVar * changed function signature of . Will Break tests * progress towards refactor * marked where we left off * got state-based SEL working * added default if nodyn * moved torch agnostic implementation out of torchdiffeq module * separated searching from dynamic events from simulating. This will be useful when we log * pulled out interruption logic from simulation * replaced name of Point with Static and fixed linter * renamed TrajectoryLogging to DynamicTrace * got DynamicTrace working * added more testing * lint * lint * got noop interruptions tests working * lint * more progress on NonInterruptionPointObservationArray and tests * partial lint and remove comment * fixed test_solver * got dynamic interventions tests working * got static intervention tests working * fixed test_static_observation * lint * got handler composition test working * all tests pass * lint * lint * finally fixed linter version * revise notebook
Configuration menu - View commit details
-
Copy full SHA for 91dcdcf - Browse repository at this point
Copy the full SHA 91dcdcfView commit details
Commits on Oct 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 892e839 - Browse repository at this point
Copy the full SHA 892e839View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7909db - Browse repository at this point
Copy the full SHA a7909dbView commit details
Commits on Oct 6, 2023
-
Merge branch 'staging-dynamic' of https://github.com/BasisResearch/ca…
…usal_pyro into staging-dynamic
Configuration menu - View commit details
-
Copy full SHA for abe4c97 - Browse repository at this point
Copy the full SHA abe4c97View commit details -
Remove
ODEDynamics
subclass and correspondingsimulate
indirectio……n through `ode_simulate` (#298) * added missing odeint_kwargs from * removed ODEDynamics and resolved circular imports
Configuration menu - View commit details
-
Copy full SHA for 4eea206 - Browse repository at this point
Copy the full SHA 4eea206View commit details -
Migrate torchdiffeq dependency from "extras" to "install_requires" (#299
Configuration menu - View commit details
-
Copy full SHA for 3ec6e8a - Browse repository at this point
Copy the full SHA 3ec6e8aView commit details -
Simplify State and Trajectory types (#301)
* Simplify State and Trajectory * remove comment
Configuration menu - View commit details
-
Copy full SHA for 07517c8 - Browse repository at this point
Copy the full SHA 07517c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc5179c - Browse repository at this point
Copy the full SHA dc5179cView commit details
Commits on Oct 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c320c34 - Browse repository at this point
Copy the full SHA c320c34View commit details -
Clean up Trajectory.append (#303)
* generic append * fix bug in reset * revert * space * fix test
Configuration menu - View commit details
-
Copy full SHA for b4be25b - Browse repository at this point
Copy the full SHA b4be25bView commit details
Commits on Oct 10, 2023
-
Merge branch 'staging-dynamic' of https://github.com/BasisResearch/ca…
…usal_pyro into staging-dynamic
Configuration menu - View commit details
-
Copy full SHA for bbbf3da - Browse repository at this point
Copy the full SHA bbbf3daView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5c6ef5 - Browse repository at this point
Copy the full SHA f5c6ef5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9008f3 - Browse repository at this point
Copy the full SHA b9008f3View commit details
Commits on Oct 11, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9d33870 - Browse repository at this point
Copy the full SHA 9d33870View commit details -
Add default behavior for
X.t
withtorchdiffeq
solver. (#307)* add time to state in torchdiffeq _deriv method * modified tests to include simple change with time
Configuration menu - View commit details
-
Copy full SHA for 23f5144 - Browse repository at this point
Copy the full SHA 23f5144View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce75f5d - Browse repository at this point
Copy the full SHA ce75f5dView commit details -
Simplify SimulatorEventLoop logic (#309)
* Simplify interruptions * remove shallow * reoder * types and lint * types * nit * fix static logic
Configuration menu - View commit details
-
Copy full SHA for 037d740 - Browse repository at this point
Copy the full SHA 037d740View commit details -
Rename NonInterruptingPointObservationArray to StaticBatchObservation (…
…#311) * Rename NonInterruptingPointObservationArray * lint
Configuration menu - View commit details
-
Copy full SHA for c5cb880 - Browse repository at this point
Copy the full SHA c5cb880View commit details -
Rename Dynamics to InPlaceDynamics (#310)
* Rename Dynamics to InPlaceDynamics * type * remove unused type variable * union * remove dynamics for now
Configuration menu - View commit details
-
Copy full SHA for d7f545c - Browse repository at this point
Copy the full SHA d7f545cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e99c014 - Browse repository at this point
Copy the full SHA e99c014View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72e2e3c - Browse repository at this point
Copy the full SHA 72e2e3cView commit details -
Move dynamical backend interface into one file (#312)
* consolidate backend interface in one file * consolidate patterns * rename indexed to _patterns * rename to backend * rename pattern * rename pattern and lint * import * reorder file * remove deleted file * fix merge * fix error * lint * dead code * move append and rename _utils * get_solver * fix
Configuration menu - View commit details
-
Copy full SHA for d663a59 - Browse repository at this point
Copy the full SHA d663a59View commit details
Commits on Oct 12, 2023
-
Remove some trivial dynamical test cases (#315)
* Remove trivial test cases * nit * expand
Configuration menu - View commit details
-
Copy full SHA for 8872e7d - Browse repository at this point
Copy the full SHA 8872e7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 271474a - Browse repository at this point
Copy the full SHA 271474aView commit details -
Make Trajectory methods use indexed ops (#317)
* refactor trajectory.__getitem__ to use gather * Remove trivial test cases * nit * expand * add back len * save
Configuration menu - View commit details
-
Copy full SHA for 27178f2 - Browse repository at this point
Copy the full SHA 27178f2View commit details -
Rename dynamical submodules and components (#319)
* refactor trajectory.__getitem__ to use gather * Remove trivial test cases * nit * expand * add back len * save * move interruptions into one file * fix imports * rename dynamical to event_loop * rename dynamictrace to logtrajectory * fix import * remove circular import * typing nits * rename solver modules * add missing files * add back check * first ops renaming * ops file * revert changes to staticbatchobservation * rename trace->trajectory * comments * rename test file
Configuration menu - View commit details
-
Copy full SHA for f31e173 - Browse repository at this point
Copy the full SHA f31e173View commit details
Commits on Oct 16, 2023
-
Remove var_order attribute from State interface (#322)
* Move State.var_order to internals * utils * Update _utils.py
Configuration menu - View commit details
-
Copy full SHA for d589ce8 - Browse repository at this point
Copy the full SHA d589ce8View commit details -
Fix generic types and arguments of LogTrajectory and StaticBatchObser…
…vation (#324) * various fixes to logtrajectory * nit * post
Configuration menu - View commit details
-
Copy full SHA for 77bed9e - Browse repository at this point
Copy the full SHA 77bed9eView commit details -
Remove usage of Trajectory.__len__ (#323)
* remove len * fix merge --------- Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a1416f4 - Browse repository at this point
Copy the full SHA a1416f4View commit details -
Remove Trajectory.__getitem__ method (#325)
* remove len * remove trajectory getitem * remove getitem method * fix almost all tests * lint * fix remaining tests
Configuration menu - View commit details
-
Copy full SHA for e2a2b10 - Browse repository at this point
Copy the full SHA e2a2b10View commit details -
Remove Trajectory.to_state method (#326)
* remove len * remove trajectory getitem * remove getitem method * fix almost all tests * lint * fix remaining tests * remove Trajectory.to_state --------- Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 04d0b41 - Browse repository at this point
Copy the full SHA 04d0b41View commit details -
Separate Observable from InPlaceDynamics interface (#330)
* Separate Observable and Dynamics * trajectory * remove inplacedynamics
Configuration menu - View commit details
-
Copy full SHA for 1b2fbd9 - Browse repository at this point
Copy the full SHA 1b2fbd9View commit details -
* remove len * remove trajectory getitem * remove getitem method * fix almost all tests * lint * fix remaining tests * remove Trajectory.to_state * delete trajectory type * remove typevar * address comments * fix merge error --------- Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a4433f3 - Browse repository at this point
Copy the full SHA a4433f3View commit details -
Move keys property of State into a helper function get_keys (#331)
* Move keys property of state into a function * Fix merge --------- Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f9d28bc - Browse repository at this point
Copy the full SHA f9d28bcView commit details
Commits on Oct 18, 2023
-
Remove stale skipped dynamical systems tests (#339)
* Remove stale skipped tests * lint
Configuration menu - View commit details
-
Copy full SHA for 90425d1 - Browse repository at this point
Copy the full SHA 90425d1View commit details -
Add dynamical sphinx config (#342)
* Add dynamical sphinx config * add notebook to index and fix rendering and indentation errors
Configuration menu - View commit details
-
Copy full SHA for 0e7a5af - Browse repository at this point
Copy the full SHA 0e7a5afView commit details -
Use observe operation in dynamical system observation handlers (#340)
* change observation interface and fix tests * restore stale test for merge * lint and restore test for merge * Update _utils.py
Configuration menu - View commit details
-
Copy full SHA for b2984e3 - Browse repository at this point
Copy the full SHA b2984e3View commit details -
Use functional interface for dynamical systems (#341)
* change observation interface and fix tests * restore stale test for merge * lint and restore test for merge * Switch to functional interface for dynamical systems models --------- Co-authored-by: Sam Witty <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 772f824 - Browse repository at this point
Copy the full SHA 772f824View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40a2a1 - Browse repository at this point
Copy the full SHA a40a2a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f79077f - Browse repository at this point
Copy the full SHA f79077fView commit details