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

WIP: V4 update test framework for distributions random method #4580

Commits on Apr 3, 2021

  1. Initial refactoring for RandomVariable use in Model, step methods, an…

    …d basic dists
    
    These changes can be summarized as follows:
    - `Model` objects now track fully functional Theano graphs that represent all
    relationships between random and "deterministic" variables.  These graphs are
    called these "sample-space" graphs.  `Model.unobserved_RVs`, `Model.basic_RVs`,
    `Model.free_RVs`, and `Model.observed_RVs` contain these
    graphs (i.e. `TensorVariable`s), which are generated by `RandomVariable` `Op`s.
    - For each random variable, there is now a corresponding "measure-space"
    variable (i.e. a `TensorVariable` that corresponds to said variable in a
    log-likelihood graph).  These variables are available as `rv_var.tag.value_var`,
    for each random variable `rv_var`, or via `Model.vars`.
    - Log-likelihood (i.e. measure-space) graphs are now created for individual
    random variables by way of the generic functions `logpt`, `logcdf`,
    `logp_nojac`, and `logpt_sum` in `pymc3.distributions`.
    - Numerous uses of concrete shape information stemming from `Model`
    objects (e.g. `Model.size`) have been removed/refactored.
    - Use of `FreeRV`, `ObservedRV`, `MultiObservedRV`, and `TransformedRV` has been
    deprecated.  The information previously stored in these classes is now tracked
    using `TensorVariable.tag`, and log-likelihoods are generated using the
    aforementioned `log*` generic functions.
    brandonwillard authored and matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    b283649 View commit details
    Browse the repository at this point in the history
  2. Remove shape dependencies from DictToArrayBijection

    This commit changes `DictToArrayBijection` so that it returns a `RaveledVars`
    datatype that contains the original raveled and concatenated vector along with
    the information needed to revert it back to dictionay/variables form.
    
    Simply put, the variables-to-single-vector mapping steps have been pushed away
    from the model object and its symbolic terms and closer to the (sampling)
    processes that produce and work with `ndarray` values for said terms.  In doing
    so, we can operate under fewer unnecessarily strong assumptions (e.g. that the
    shapes of each term are static and equal to the initial test points), and let
    the sampling processes that require vector-only steps deal with any changes in
    the mappings.
    brandonwillard authored and matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    02e25aa View commit details
    Browse the repository at this point in the history
  3. Remove newly deprecated classes and functions

    Classes and functions removed:
    - PyMC3Variable
    - ObservedRV
    - FreeRV
    - MultiObservedRV
    - TransformedRV
    - ArrayOrdering
    - VarMap
    - DataMap
    - _DrawValuesContext
    - _DrawValuesContextBlocker
    - is_fast_drawable
    - _compile_theano_function
    - vectorize_theano_function
    - get_vectorize_signature
    - _draw_value
    - draw_values
    - generate_samples
    - fast_sample_posterior_predictive
    
    Modules removed:
    - pymc3.distributions.posterior_predictive
    - pymc3.tests.test_random
    brandonwillard authored and matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    d160316 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b5065dc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2596a75 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8bd4733 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b7b2963 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f1b4da9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    207fc06 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    08da3cc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    af6ffac View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    121c517 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a5b1690 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3d4a8b4 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    63c2688 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5bb71d9 View commit details
    Browse the repository at this point in the history
  17. Add non_sequences to uses of Scan Op

    This make `aesara.graph.basic.clone_replace` work correctly when `Scan`s are
    included in a graph.
    brandonwillard authored and matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    319dc2e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1fde7e3 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1588645 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    801c61a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    8bcbe59 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    886e3f8 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    ea324a3 View commit details
    Browse the repository at this point in the history
  24. Fix Interval.jacobian_det

    brandonwillard authored and matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    9ace182 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    134c90e View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    fcd277c View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    e829c19 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    c937600 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    60a90be View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    931c494 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    7bfcebf View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    90ed8e1 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ab31fc8 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a3ad9d1 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    15a29b2 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    a5d8609 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    3885d65 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    2d16aa5 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    4231ee2 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    ab41e0d View commit details
    Browse the repository at this point in the history
  41. Update tests following distributions refactoring

    The distributions refactoring moves the random variable sampling to
    aesara. This relies on numpy and scipy random variables implementation.
    So, now the only thing we care about testing is that the parametrization
    on the PyMC side is sendible given the one on the Aesara side
    (effectively the numpy/scipy one)
    
    More details can be found on issue pymc-devs#4554
    pymc-devs#4554
    matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    c6f2f31 View commit details
    Browse the repository at this point in the history
  42. Change tests for more refactored distributions.

    More details on commit id 0773620b6f599423315035b97ef082ad32d98fd4
    matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    199451d View commit details
    Browse the repository at this point in the history
  43. Change tests for refactored distributions

    More details on commit id 0773620b6f599423315035b97ef082ad32d98fd4
    comment.
    matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    a312231 View commit details
    Browse the repository at this point in the history
  44. Remove tests for random variable samples shape and size

    Most of the random variable logic has been moved to aesara, as well as
    most of the relative tests. More details can be found on issue pymc-devs#4554
    matteo-pallini committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    5008194 View commit details
    Browse the repository at this point in the history