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

Prepare branch for the TFP 0.12.0 release #1199

Merged
merged 36 commits into from
Dec 22, 2020
Merged

Commits on Dec 21, 2020

  1. Enforce PY3 for multi-substrate targets. Change PY2AND3 to PY3 throug…

    …hout.
    
    PiperOrigin-RevId: 346372466
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    bbb6071 View commit details
    Browse the repository at this point in the history
  2. Add arg for custom parameter-generating strategy in distribution Hypo…

    …thesis tests.
    
    PiperOrigin-RevId: 346374625
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    b76652e View commit details
    Browse the repository at this point in the history
  3. Implement stopping ratio logistic distribution

    Hello,
    
    this PR again implements the stopping ratio logistic distribution which was already discussed and reviewed [here](tensorflow#963).
    
    @srvasude , sorry for closing the other PR. I worked in your requested changes other than the transpose that needs to be done when sampling.
    
    Thanks.
    
    Cheers,
    Simon
    
    COPYBARA_INTEGRATE_REVIEW=tensorflow#990 from dirmeier:stopping_ratio 0743b54
    PiperOrigin-RevId: 346376187
    dirmeier authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    aae8cc4 View commit details
    Browse the repository at this point in the history
  4. Add mpmath as a test dependency.

    PiperOrigin-RevId: 346378914
    srvasude authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    9d3addd View commit details
    Browse the repository at this point in the history
  5. Merge pull request tensorflow#1188 from SamuelMarks:args-for-google-s…

    …tyle-docstrings
    
    PiperOrigin-RevId: 346395749
    tensorflower-gardener authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    44431dd View commit details
    Browse the repository at this point in the history
  6. Fix bug in tfp.math.bracket_root for negative roots.

    PiperOrigin-RevId: 346430469
    jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    6a8bd09 View commit details
    Browse the repository at this point in the history
  7. Update build_asvi_surrogate_posterior to handle substituted distrib…

    …utions, some nested distributions, and a mean field option.
    
    PiperOrigin-RevId: 346440980
    kateslin authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    13ceab7 View commit details
    Browse the repository at this point in the history
  8. Add utilities for batched (transpose) convolutions to `tfp.experiment…

    …al.nn`.
    
    PiperOrigin-RevId: 346614698
    emilyfertig authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    30bdacf View commit details
    Browse the repository at this point in the history
  9. [TFP] Do non-lazy loading of symbols if TF is already loaded.

    This means one must only 'import tensorflow_probability' to load saved models
    that have serialized TFP keras layers and TFP CompositeTensor specs.
    
    PiperOrigin-RevId: 346639386
    ebrevdo authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    605a1ec View commit details
    Browse the repository at this point in the history
  10. Fix bug in the batch_shape of JointDistributions transformed by t…

    …he `Restructure` bijector.
    
    PiperOrigin-RevId: 346669515
    emilyfertig authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    a1de748 View commit details
    Browse the repository at this point in the history
  11. Enable tfp.experimental.distribute in JAX backend

    PiperOrigin-RevId: 346676496
    sharadmv authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    cb2ed69 View commit details
    Browse the repository at this point in the history
  12. Add ThinningKernel to experimental.mcmc.

    This is adapted from `SampleDiscardingKernel`, sans burn-in; it has the advantage of not wrapping `KernelResults`.
    
    PiperOrigin-RevId: 346698326
    midfield authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    2c190f4 View commit details
    Browse the repository at this point in the history
  13. Small fixes to docs.

    PiperOrigin-RevId: 346793654
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    d0e533a View commit details
    Browse the repository at this point in the history
  14. Add experimental_use_kahan_sum to ShardedIndependent + fix its parame…

    …ters.
    
    PiperOrigin-RevId: 346868095
    SiegeLordEx authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    67e6c7b View commit details
    Browse the repository at this point in the history
  15. Fix docstring description of default name.

    PiperOrigin-RevId: 346910502
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    a46e9d4 View commit details
    Browse the repository at this point in the history
  16. Fix cast creating Tracer in JAX backend.

    PiperOrigin-RevId: 347085672
    sharadmv authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    e132aa4 View commit details
    Browse the repository at this point in the history
  17. Modify auto_composite_tensor to prefer static values for fields annot…

    …ated as "_composite_tensor_shape_parameters".
    
    Prior to the fix, test fails with "ValueError: Input tensor 'IndependentNormal_2/log_prob/Sum:0' enters the loop with shape (), but has shape <unknown> after one iteration. To allow the shape to vary across iterations, use the `shape_invariants` argument of tf.while_loop to specify a less-specific shape."
    
    PiperOrigin-RevId: 347446310
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    8854db0 View commit details
    Browse the repository at this point in the history
  18. Enable build_factored_surrogate_posterior to take a multipart uncon…

    …straining bijector.
    
    PiperOrigin-RevId: 347448699
    emilyfertig authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    5105793 View commit details
    Browse the repository at this point in the history
  19. Add support for non-list initial variance structures.

    PiperOrigin-RevId: 347460285
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    e0ca329 View commit details
    Browse the repository at this point in the history
  20. Replace deprecated arg name in surrogate_posteriors_test.

    PiperOrigin-RevId: 347499168
    emilyfertig authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    2dbfdaf View commit details
    Browse the repository at this point in the history
  21. Update docstring to reflect constraining_bijectors deprecation.

    PiperOrigin-RevId: 347505196
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    37c9455 View commit details
    Browse the repository at this point in the history
  22. Exclude StoppingRatioLogistic distribution from `testCanConstructAn…

    …dSampleDistribution`.
    
    PiperOrigin-RevId: 347528419
    midfield authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    9ce021a View commit details
    Browse the repository at this point in the history
  23. Disable GeneralizedExtremeValue distribution from `jax_transformati…

    …on_test.testLogProbSample`.
    
    Re-enable after http://b/175654800 is resolved.
    
    PiperOrigin-RevId: 347535479
    midfield authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    a2e2b59 View commit details
    Browse the repository at this point in the history
  24. Remove TFP references to deprecated Affine bijectors.

    PiperOrigin-RevId: 347638177
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    7792a90 View commit details
    Browse the repository at this point in the history
  25. Remove support for a long-deprecated trace_fn signature.

    PiperOrigin-RevId: 343150107
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    b49a757 View commit details
    Browse the repository at this point in the history
  26. Ensure that all traceable quantities in minimize are actually trace…

    …able.
    
    PiperOrigin-RevId: 347655640
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    2f313b8 View commit details
    Browse the repository at this point in the history
  27. Update tensor_shape.py for numpy backend.

    PiperOrigin-RevId: 347660796
    midfield authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    9d42d9d View commit details
    Browse the repository at this point in the history
  28. Avoid feeding Nones to tf.control_dependencies in mixed eager/graph…

    … contexts.
    
    Add a property-based test that tries to create Distributions in eager mode then
    sample from them in graph mode, to exercise the failure mode.
    
    PiperOrigin-RevId: 347692243
    csuter authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    23d9353 View commit details
    Browse the repository at this point in the history
  29. Avoid Shift(None) bug in VectorExponentialLinearOperator.

    PiperOrigin-RevId: 347710953
    davmre authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    a06f0d8 View commit details
    Browse the repository at this point in the history
  30. Adds tfp.experimental.bijectors.inverse_log_det_jacobian_ratio.

    Adds `tfp.experimental.distributions.log_prob_ratio(p, x, q, y) = p(x) - q(y)`.
    
    Custom implementations are registered for `tfd.Independent`, `tfd.Sample`, `tfd.JointDistribution*`, `tfd.TransformedDistribution`, `tfb.Chain`, and `tfb.ScaleMatvecDiag`.
    
    MVNDiag is tested as a proof of concept, in transformed_distribution_test.
    
    PiperOrigin-RevId: 347822296
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    876d512 View commit details
    Browse the repository at this point in the history
  31. Add a default bijector to the Deterministic distributions.

    Also fixes an XLA compilation issue (no StringFormat, PrintV2 ops in XLA) introduced by the logdet degree-of-freedom warning. This was exposed by the new test in deterministic_test.py (Deterministic default bijector uses Chain, which uses composition.py).
    
    PiperOrigin-RevId: 347832464
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    e7d64b7 View commit details
    Browse the repository at this point in the history
  32. Rewrite experimental sample_chain in terms of run_kernel.

    Implement burn-in by sequencing two calls of run_kernel, and thinning
    by inserting a ThinningKernel into the kernel onion.
    
    Also change the default tracing function to account for the fact that
    the chain state history is no longer returned separately by default.
    
    Delete tests that no longer make sense.
    
    PiperOrigin-RevId: 347836706
    axch authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    d3bf5a0 View commit details
    Browse the repository at this point in the history
  33. Add float64 support to PHMC.

    Previously, had the exception: "TypeError: Tensors in list passed to 'inputs' of 'AddN' Op have types [float64, float64, float32] that don't all match."
    
    PiperOrigin-RevId: 347871205
    brianwa84 authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    5f0dbec View commit details
    Browse the repository at this point in the history
  34. Allow 0 concentration in gamma samplers.

    Gamma(concentration=0) always samples 0.
    ExpGamma(concentration=0) always samples -inf.
    Beta(concentration1=0) always samples 0.
    Beta(concentration0=0) always samples 1.
    BetaBinomial(concentration1=0) always samples 0.
    BetaBinomial(concentration0=0) always samples total_counts.
    likewise for Dirichlet and DirichletMultinomial.
    
    Not changing the validation because (i) inertia, and (ii) any of these
    distributions is still degenerate with a 0 concentration, so should
    arguably be avoided when possible.
    
    PiperOrigin-RevId: 347876446
    axch authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    1cc5c39 View commit details
    Browse the repository at this point in the history
  35. internal change

    PiperOrigin-RevId: 348378916
    vanderplas authored and jburnim committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    ead8501 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

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