TuringLang / Turing.jl

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

Test produces lots of errors #867

Closed itsdfish closed 4 years ago

itsdfish commented 4 years ago

Hi-

In case this is unknown, want to report that several tests fail. In addition, Turing emits tons of numerical errors of the following sort:

┌ Warning: The current proposal will be rejected due to numerical error(s).
│   isfiniteθ = false
│   isfiniter = false
│   isfiniteℓπ = false
│   isfiniteℓκ = false
└ @ AdvancedHMC ~/.julia/packages/AdvancedHMC/Ihu4Y/src/hamiltonian.jl:36

Unfortunately, I could not identify the tests associated with the numerical errors because my REPL history ran out of memory.

Here is my system information:

Julia 1.1.0

(v1.1) pkg> st Turing
    Status `~/.julia/environments/v1.1/Project.toml`
  [0bf59076] AdvancedHMC v0.2.1
  [31c24e10] Distributions v0.21.0
  [c7f686f2] MCMCChains v0.3.10
  [4c63d2b9] StatsFuns v0.8.0
  [fce5fe82] Turing v0.6.22
  [e88e6eb3] Zygote v0.3.2

(v1.1) pkg> st AdvancedHMC
    Status `~/.julia/environments/v1.1/Project.toml`
  [0bf59076] AdvancedHMC v0.2.1
  [d96e819e] Parameters v0.10.3
  [2913bbd2] StatsBase v0.31.0

Test Results:

Test Summary:                                                       | Pass  Fail  Error  Total
Turing                                                              | 3584     8      6   3598
  core                                                              |  299     3      1    303
    ad.jl                                                           |  118     2           120
      AD compatibility                                              |   23     2            25
      adr                                                           |    1                   1
      passing duals to distributions                                |    6                   6
      general AD tests                                              |    2                   2
      Tracker + logdet                                              |    2                   2
      Tracker + fill                                                |    6                   6
      Tracker + MvNormal                                            |    3                   3
      Tracker + Diagonal Normal                                     |    3                   3
      Tracker + MvNormal Interface                                  |   72                  72
      Simplex Tracker AD                                            |                    No tests
      PDMatDistribution Tracker AD                                  |                    No tests
    compiler.jl                                                     |   25            1     26
      assume                                                        |    4                   4
      beta binomial                                                 |    3                   3
      forbid global                                                 |                    No tests
      model macro                                                   |   11                  11
      new grammar                                                   |                    No tests
      new interface                                                 |                    No tests
      no return                                                     |    2                   2
      observe                                                       |    5                   5
      sample                                                        |                    No tests
      vectorization                                                 |                 1      1
      Type parameters                                               |                    No tests
      tilde                                                         |                    No tests
    container.jl                                                    |    4                   4
    RandomVariables.jl                                              |  152     1           153
      TypedVarInfo                                                  |   14                  14
      Base                                                          |   48                  48
      runmodel!                                                     |    2                   2
      flags                                                         |    6                   6
      link!                                                         |   12                  12
      setgid!                                                       |    4                   4
      orders                                                        |   22                  22
      replay                                                        |                    No tests
      varname                                                       |   11     1            12
      varinfo                                                       |   33                  33
  inference                                                         | 3178     5      3   3186
    samplers                                                        | 3178     5      3   3186
      dynamichmc.jl                                                 |    2                   2
      gibbs.jl                                                      |   14                  14
      hmc.jl                                                        |   16            1     17
        constrained bounded                                         |    1                   1
        contrained simplex                                          |    2                   2
        hmc reverse diff                                            |    2                   2
        matrix support                                              |    1                   1
        multivariate support                                        |                 1      1
        hmcda inference                                             |    4                   4
        hmcda constructor                                           |    2                   2
        nuts inference                                              |    2                   2
        nuts constructor                                            |                    No tests
        check discard                                               |    2                   2
      is.jl                                                         | 3100                3100
      mh.jl                                                         |   12                  12
      sghmc.jl                                                      |    8                   8
      sgld.jl                                                       |    6            1      7
        sgld constructor                                            |    6                   6
        sgld inference                                              |                 1      1
      smc.jl                                                        |                    No tests
      pmmh.jl                                                       |    8     4            12
        pmmh constructor                                            |                    No tests
        pmmh inference                                              |    8     4            12
      ipmcmc.jl                                                     |    7     1             8
        ipmcmc constructor                                          |                    No tests
        ipmcmc inference                                            |    7     1             8
      resample.jl                                                   |    5                   5
  variational                                                       |    2                   2
  stdlib                                                            |   66            2     68
    distributions.jl                                                |   66            2     68
      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}}}        |                 1      1
            InverseWishart{Float64,PDMat{Float64,Array{Float64,2}}} |                 1      1
  utilities                                                         |   39                  39
ERROR: LoadError: Some tests did not pass: 3584 passed, 8 failed, 6 errored, 0 broken.
in expression starting at /Users/christopher.fisher/.julia/packages/Turing/bAh9v/test/runtests.jl:12
ERROR: Package Turing errored during testing
jonasmac16 commented 4 years ago

I have the same issue. Turing models containing ODEs which ran fine before are failing since I updated.

yebai commented 4 years ago

This is probably due to similar reasons causing https://github.com/TuringLang/Turing.jl/issues/866 and should be fixed by TuringLang/AdvancedHMC.jl#86 and TuringLang/AdvancedHMC.jl#85

mohamed82008 commented 4 years ago

This should be resolved now.