TuringLang / Turing.jl

Bayesian inference with probabilistic programming.
https://turinglang.org
MIT License
2.05k stars 219 forks source link

7 Errors during test Turing with Julia 1.4.2 #1305

Closed Pindar777 closed 4 years ago

Pindar777 commented 4 years ago

Hi there,

I wonder how to pass all tests. That is the output

Test Summary: | Pass Error Total

Turing | 9930 7 9937

 core                                                                    |  245      2    247
 ad.jl                                                                   |  211      2    213
  adr                                                                   |    2             2
  passing duals to distributions                                        |    6             6
  general AD tests                                                      |    1      1      2
  Tracker, Zygote and ReverseDiff + logdet                              |    6             6
  Tracker & Zygote + fill                                               |   12            12
  Tracker, Zygote and ReverseDiff + MvNormal                            |    5             5
  Tracker, Zygote and ReverseDiff + Diagonal Normal                     |    5             5
  Tracker, Zygote and ReverseDiff + MvNormal Interface                  |  170           170
  Simplex Tracker, Zygote and ReverseDiff (with and without caching) AD |    2             2
  PDMatDistribution AD                                                  |           1      1
  Hessian test                                                          |    2             2
container.jl                                                            |   34            34
 inference: forwarddiff                                                    | 3190      1   3191
samplers                                                                | 3190      1   3191
  gibbs.jl                                                              |   24            24
  hmc.jl                                                                |   19      1     20
    constrained bounded                                                 |    1             1
    contrained simplex                                                  |    2             2
    hmc reverse diff                                                    |    2             2
    matrix support                                                      |           1      1
    multivariate support                                                |              No tests
    hmcda inference                                                     |    4             4
    hmcda constructor                                                   |    2             2
    nuts inference                                                      |    2             2
    nuts constructor                                                    |              No tests
    check discard                                                       |    2             2
    AHMC resize                                                         |    3             3
    Regression tests                                                    |    1             1
  is.jl                                                                 | 3002          3002
  mh.jl                                                                 |   26            26
  ESS                                                                   |   11            11
  SMC                                                                   |   25            25
  PG                                                                    |   35            35
  resample.jl                                                           |    5             5
  io.jl                                                                 |   41            41
  dynamichmc.jl                                                         |    2             2
variational algorithms : forwarddiff                                      |    6             6
inference: tracker                                                        | 3190      1   3191
samplers                                                                | 3190      1   3191
  gibbs.jl                                                              |   24            24
  hmc.jl                                                                |   19      1     20
    constrained bounded                                                 |    1             1
    contrained simplex                                                  |    2             2
    hmc reverse diff                                                    |    2             2
    matrix support                                                      |           1      1
    multivariate support                                                |              No tests
    hmcda inference                                                     |    4             4
    hmcda constructor                                                   |    2             2
    nuts inference                                                      |    2             2
    nuts constructor                                                    |              No tests
    check discard                                                       |    2             2
    AHMC resize                                                         |    3             3
    Regression tests                                                    |    1             1
  is.jl                                                                 | 3002          3002
  mh.jl                                                                 |   26            26
  ESS                                                                   |   11            11
  SMC                                                                   |   25            25
  PG                                                                    |   35            35
  resample.jl                                                           |    5             5
  io.jl                                                                 |   41            41
  dynamichmc.jl                                                         |    2             2
variational algorithms : tracker                                          |    6             6
inference: reversediff                                                    | 3190      1   3191
samplers                                                                | 3190      1   3191
  gibbs.jl                                                              |   24            24
  hmc.jl                                                                |   19      1     20
    constrained bounded                                                 |    1             1
    contrained simplex                                                  |    2             2
    hmc reverse diff                                                    |    2             2
    matrix support                                                      |           1      1
    multivariate support                                                |              No tests
    hmcda inference                                                     |    4             4
    hmcda constructor                                                   |    2             2
    nuts inference                                                      |    2             2
    nuts constructor                                                    |              No tests
    check discard                                                       |    2             2
    AHMC resize                                                         |    3             3
    Regression tests                                                    |    1             1
  is.jl                                                                 | 3002          3002
  mh.jl                                                                 |   26            26
  ESS                                                                   |   11            11
  SMC                                                                   |   25            25
  PG                                                                    |   35            35
  resample.jl                                                           |    5             5
  io.jl                                                                 |   41            41
  dynamichmc.jl                                                         |    2             2
variational algorithms : reversediff                                      |    6             6
variational optimisers                                                    |    8             8
stdlib                                                                    |   70      2     72
distributions.jl                                                        |   68      2     70
  distributions functions                                               |    1             1
  distributions functions                                               |    1             1
  distributions functions                                               |    1             1
 single distribution correctness                                       |   65      2     67
   Correctness test for single distributions                           |   65      2     67
      UnivariateDistribution                                            |   59            59
      MultivariateDistribution                                          |    6             6
      MatrixDistribution                                                |           2      2
        Wishart{Float64,PDMat{Float64,Array{Float64,2}},Int64}          |           1      1
        InverseWishart{Float64,PDMat{Float64,Array{Float64,2}}}         |           1      1
RandomMeasures.jl                                                       |    2             2
utilities                                                                 |    1             1
modes                                                                     |   18            18

ERROR: LoadError: Some tests did not pass: 9930 passed, 0 failed, 7 errored, 0 broken. in expression starting at... \test\runtests.jl:12 ERROR: Package Turing errored during testing

I installed these packages on Windows 10 1909

Turing v0.13.0 #master and MCMCChains v3.0.12

How to debug further and solve the issue?

Often lumes up hmc.jl.

devmotion commented 4 years ago

I assume most/all test failures are due to a breaking change in the latest release of Distributions (which according to SemVer should have been non-breaking, but maybe the change of fields is considered to be non-breaking in general...). The field c0 of InverseWishart was changed to logc0, see https://github.com/JuliaStats/Distributions.jl/compare/v0.23.2...v0.23.3. This change requires an update of DistributionsAD for Distributions >= 0.23.3.

Hence I assume tests pass if you install Distributions 0.23.2.

Pindar777 commented 4 years ago

@devmotion Thank you for the fast response and hint. I downgraded to Distributions 0.23.2 and all tests are passed.