Skip to content
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

Separate influence_fn operations from estimator semantics using effect handlers #478

Closed
wants to merge 60 commits into from

Commits on Nov 8, 2023

  1. added robust folder

    agrawalraj committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    38b6158 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2023

  1. Configuration menu
    Copy the full SHA
    c09dcab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    21e31bf View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. uncomitted changes

    agrawalraj committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    faed235 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. uncomitted changes

    agrawalraj committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    fac98cd View commit details
    Browse the repository at this point in the history
  2. pair coding w/ eli

    agrawalraj committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    4edcb5e View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. added tests w/ Eli

    agrawalraj committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    fe17403 View commit details
    Browse the repository at this point in the history
  2. eif

    eb8680 committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    b159687 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2023

  1. linting

    agrawalraj committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    33f4811 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Configuration menu
    Copy the full SHA
    8e171f4 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Configuration menu
    Copy the full SHA
    93cc014 View commit details
    Browse the repository at this point in the history
  2. fix more args

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    9bc704c View commit details
    Browse the repository at this point in the history
  3. ops file

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    cedb818 View commit details
    Browse the repository at this point in the history
  4. file

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    418f792 View commit details
    Browse the repository at this point in the history
  5. format

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    f792ddf View commit details
    Browse the repository at this point in the history
  6. lint

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    88a100b View commit details
    Browse the repository at this point in the history
  7. clean up influence and tests

    eb8680 committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    94c2fc6 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. make tests more generic

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    da0bc5c View commit details
    Browse the repository at this point in the history
  2. guess max plate nesting

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    4d027e4 View commit details
    Browse the repository at this point in the history
  3. linearize

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    e85e33f View commit details
    Browse the repository at this point in the history
  4. rename file

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    1734191 View commit details
    Browse the repository at this point in the history
  5. tensor flatten

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    f46556b View commit details
    Browse the repository at this point in the history
  6. predictive eif

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    1abc5e0 View commit details
    Browse the repository at this point in the history
  7. jvp type

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    9c80b60 View commit details
    Browse the repository at this point in the history
  8. reorganize files

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    931da4f View commit details
    Browse the repository at this point in the history
  9. shrink test case

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    dc63f31 View commit details
    Browse the repository at this point in the history
  10. move guess_max_plate_nesting

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    be3bc8d View commit details
    Browse the repository at this point in the history
  11. move cg solver to linearze

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    9ce164a View commit details
    Browse the repository at this point in the history
  12. type alias

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    81196d4 View commit details
    Browse the repository at this point in the history
  13. test_ops

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    30cb2e7 View commit details
    Browse the repository at this point in the history
  14. basic cg tests

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    21cf2d7 View commit details
    Browse the repository at this point in the history
  15. remove failing test case

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    720661f View commit details
    Browse the repository at this point in the history
  16. format

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    91833da View commit details
    Browse the repository at this point in the history
  17. move paramdict up

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    548069a View commit details
    Browse the repository at this point in the history
  18. remove obsolete test files

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    12b22c0 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    d2bbf9d View commit details
    Browse the repository at this point in the history
  20. add empty handlers

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    3b72bb0 View commit details
    Browse the repository at this point in the history
  21. add chirho.robust to docs

    eb8680 committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    89d9f6b View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. fix memory leak in tests

    eb8680 committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    7582c22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82c23e8 View commit details
    Browse the repository at this point in the history
  3. typing_extensions

    eb8680 committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    e08d9d6 View commit details
    Browse the repository at this point in the history
  4. add branch to ci

    eb8680 committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    22eae09 View commit details
    Browse the repository at this point in the history
  5. predictive

    eb8680 committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    d0014db View commit details
    Browse the repository at this point in the history
  6. remove imprecise annotation

    eb8680 committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    e5342dc View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    be13ac5 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. Added more tests for linearize and make_empirical_fisher_vp (#405)

    * initial test against analytic fisher vp (pair coded w/ sam)
    
    * linting
    
    * added check against analytic ate
    
    * added vmap and grad smoke tests
    
    * added missing init
    
    * linting and consolidated fisher tests to one file
    
    * fixed types
    
    * fixing linting errors
    
    * trying to fix type error for python 3.8
    
    * fixing test errors
    
    * added patch to test to prevent from failing when denom is small
    
    * composition issue
    
    * removed missing import
    
    * fixed failing test with seeding
    
    * addressing Eli's comments
    agrawalraj authored Dec 6, 2023
    Configuration menu
    Copy the full SHA
    c5fe64b View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2023

  1. Add upper bound on number of CG steps (#404)

    * upper bound on cg_iters
    
    * address comment
    eb8680 authored Dec 7, 2023
    Configuration menu
    Copy the full SHA
    117d645 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fe1b25 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2023

  1. Make NMCLogPredictiveLikelihood seeded (#408)

    * initial test against analytic fisher vp (pair coded w/ sam)
    
    * linting
    
    * added check against analytic ate
    
    * added vmap and grad smoke tests
    
    * added missing init
    
    * linting and consolidated fisher tests to one file
    
    * fixed types
    
    * fixing linting errors
    
    * trying to fix type error for python 3.8
    
    * fixing test errors
    
    * added patch to test to prevent from failing when denom is small
    
    * composition issue
    
    * seeded NMC implementation
    
    * linting
    
    * removed missing import
    
    * changed to eli's seedmessenger suggestion
    
    * added failing edge case
    
    * explicitly add max plate argument
    
    * added warning message
    
    * fixed linting error and test failure case from too many cg iters
    
    * eli's contextlib seeding strategy
    
    * removed seedmessenger from test
    
    * randomness should be shared across calls
    
    * switched back to different
    agrawalraj authored Dec 8, 2023
    Configuration menu
    Copy the full SHA
    3f0c83d View commit details
    Browse the repository at this point in the history
  2. Use Hessian formulation of Fisher information in `make_empirical_fish…

    …er_vp` (#430)
    
    * hessian vector product formulation for fisher
    
    * ignoring small type error
    
    * fixed linting error
    agrawalraj authored Dec 8, 2023
    Configuration menu
    Copy the full SHA
    4d41807 View commit details
    Browse the repository at this point in the history
  3. Add new SimpleModel and SimpleGuide (#440)

    * initial test against analytic fisher vp (pair coded w/ sam)
    
    * linting
    
    * added check against analytic ate
    
    * added vmap and grad smoke tests
    
    * added missing init
    
    * linting and consolidated fisher tests to one file
    
    * fixed types
    
    * fixing linting errors
    
    * trying to fix type error for python 3.8
    
    * fixing test errors
    
    * added patch to test to prevent from failing when denom is small
    
    * composition issue
    
    * seeded NMC implementation
    
    * linting
    
    * removed missing import
    
    * changed to eli's seedmessenger suggestion
    
    * added failing edge case
    
    * explicitly add max plate argument
    
    * added warning message
    
    * fixed linting error and test failure case from too many cg iters
    
    * eli's contextlib seeding strategy
    
    * removed seedmessenger from test
    
    * randomness should be shared across calls
    
    * uncomitted change before branch switch
    
    * switched back to different
    
    * added revised simple model and guide
    
    * added multiple link functions in test
    
    * linting
    agrawalraj authored Dec 8, 2023
    Configuration menu
    Copy the full SHA
    2e01b7b View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2023

  1. Batching in linearize and influence (#465)

    * batching in linearize and influence
    
    * addressing eli's review
    
    * added optimization for pointwise false case
    
    * fixing lint error
    agrawalraj authored Dec 22, 2023
    Configuration menu
    Copy the full SHA
    538cef8 View commit details
    Browse the repository at this point in the history
  2. batched cg (#466)

    agrawalraj authored Dec 22, 2023
    Configuration menu
    Copy the full SHA
    6bba70b View commit details
    Browse the repository at this point in the history
  3. One step correction implemented (#467)

    * one step correction
    
    * increased tolerance
    
    * fixing lint issue
    agrawalraj authored Dec 22, 2023
    Configuration menu
    Copy the full SHA
    f143d3a View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. Replace some torch.vmap usage with a hand-vectorized `BatchedNMCLog…

    …PredictiveLikelihood` (#473)
    
    * sketch batched nmc lpd
    
    * nits
    
    * fix type
    
    * format
    
    * comment
    
    * comment
    
    * comment
    
    * typo
    
    * typo
    
    * add condition to help guarantee idempotence
    
    * simplify edge case
    
    * simplify plate_name
    
    * simplify batchedobservation logic
    
    * factorize
    
    * simplify batched
    
    * reorder
    
    * comment
    
    * remove plate_names
    
    * types
    
    * formatting and type
    
    * move unbind to utils
    
    * remove max_plate_nesting arg from get_traces
    
    * comment
    
    * nit
    
    * move get_importance_traces to utils
    
    * fix types
    
    * generic obs type
    
    * lint
    
    * format
    
    * handle observe in batchedobservations
    
    * event dim
    
    * move batching handlers to utils
    
    * replace 2/3 vmaps, tests pass
    
    * remove dead code
    
    * format
    
    * name args
    
    * lint
    
    * shuffle code
    
    * try an extra optimization in batchedlatents
    
    * add another optimization
    
    * undo changes to test
    
    * remove inplace adds
    
    * add performance test showing speedup
    
    * document internal helpers
    
    * batch latents test
    
    * move batch handlers to predictive
    
    * add bind_leftmost_dim, document PredictiveFunctional and PredictiveModel
    
    * use bind_leftmost_dim in log prob
    eb8680 authored Jan 2, 2024
    Configuration menu
    Copy the full SHA
    878eb0d View commit details
    Browse the repository at this point in the history
  2. Added documentation for chirho.robust (#470)

    * documentation
    
    * documentation clean up w/ eli
    
    * fix lint issue
    agrawalraj authored Jan 2, 2024
    Configuration menu
    Copy the full SHA
    3cfe319 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2024

  1. Configuration menu
    Copy the full SHA
    5cf85e5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58c2bf9 View commit details
    Browse the repository at this point in the history
  3. revise tests

    SamWitty committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    622f97a View commit details
    Browse the repository at this point in the history
  4. remove unused imports

    SamWitty committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    df8e802 View commit details
    Browse the repository at this point in the history