Skip to content

Fatal error in type inference in StatsModels #31803

@ararslan

Description

@ararslan

Running the tests for Survival on Julia nightly, we get the following error:

Cox: Error During Test at /home/travis/build/JuliaStats/Survival.jl/test/runtests.jl:188
  Got exception outside of a @test
  fatal error in type inference (type bound)
  Stacktrace:
   [1] StatsModels.Terms(::Formula) at /home/travis/.julia/packages/StatsModels/pBxdt/src/formula.jl:341
   [2] #fit#36(::Dict{Any,Any}, ::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:tol,),Tuple{Float64}}}, ::typeof(fit), ::Type{CoxModel}, ::Formula, ::DataFrame) at /home/travis/.julia/packages/StatsModels/pBxdt/src/statsmodel.jl:66
   [3] (::getfield(StatsBase, Symbol("#kw##fit")))(::NamedTuple{(:tol,),Tuple{Float64}}, ::typeof(fit), ::Type{CoxModel}, ::Formula, ::DataFrame) at ./none:0
   [4] #coxph#20(::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:tol,),Tuple{Float64}}}, ::typeof(coxph), ::Formula, ::DataFrame) at /home/travis/build/JuliaStats/Survival.jl/src/cox.jl:203
   [5] (::getfield(Survival, Symbol("#kw##coxph")))(::NamedTuple{(:tol,),Tuple{Float64}}, ::typeof(coxph), ::Formula, ::DataFrame) at ./none:0
   [6] top-level scope at /home/travis/build/JuliaStats/Survival.jl/test/runtests.jl:192
   [7] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1113
   [8] top-level scope at /home/travis/build/JuliaStats/Survival.jl/test/runtests.jl:189
   [9] include at ./boot.jl:328 [inlined]
   [10] include_relative(::Module, ::String) at ./loading.jl:1094
   [11] include(::Module, ::String) at ./Base.jl:31
   [12] include(::String) at ./client.jl:431
   [13] top-level scope at none:5
   [14] eval(::Module, ::Any) at ./boot.jl:330
   [15] exec_options(::Base.JLOptions) at ./client.jl:271
   [16] _start() at ./client.jl:464

The line in StatsModels identified by the stack trace is https://github.com/JuliaStats/StatsModels.jl/blob/v0.5.0/src/formula.jl#L341.

This does not occur on 0.7, 1.0, or 1.1, so it seems like a regression.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inference

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions