IQVIA-ML / TreeParzen.jl

TreeParzen.jl, a pure Julia hyperparameter optimiser with MLJ integration
Other
35 stars 5 forks source link

Failed to precompile TreeParzen #66

Closed irving-muller closed 2 years ago

irving-muller commented 3 years ago

Describe the bug I tried to install TreeParzen using pkg. However, TreeParzen cannot be precompiled. Please find bellow the log:

 ✗ ScientificTypes
  ✗ MLJBase
  ✗ MLJTuning
  ✗ TreeParzen
  0 dependencies successfully precompiled in 15 seconds (62 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

TreeParzen [eb66a70c-a255-11e9-03ea-7ba6b2f22006]

Failed to precompile TreeParzen [eb66a70c-a255-11e9-03ea-7ba6b2f22006] to /home/irving/.julia/compiled/v1.6/TreeParzen/jl_FgN0nC.
ERROR: LoadError: LoadError: UndefVarError: ArrayLikeVariate not defined
Stacktrace:
  [1] getproperty(x::Module, f::Symbol)
    @ Base ./Base.jl:26
  [2] top-level scope
    @ ~/.julia/packages/ScientificTypes/ZRpsU/src/convention/scitype.jl:56
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
  [4] include(x::String)
    @ ScientificTypes ~/.julia/packages/ScientificTypes/ZRpsU/src/ScientificTypes.jl:1
  [5] top-level scope
    @ ~/.julia/packages/ScientificTypes/ZRpsU/src/ScientificTypes.jl:50
  [6] include
    @ ./Base.jl:386 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:360 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [11] top-level scope
    @ none:1
in expression starting at /home/irving/.julia/packages/ScientificTypes/ZRpsU/src/convention/scitype.jl:56
in expression starting at /home/irving/.julia/packages/ScientificTypes/ZRpsU/src/ScientificTypes.jl:1
ERROR: LoadError: Failed to precompile ScientificTypes [321657f4-b219-11e9-178b-2701a2544e81] to /home/irving/.julia/compiled/v1.6/ScientificTypes/jl_9S283T.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /home/irving/.julia/packages/MLJBase/7hkEm/src/MLJBase.jl:1
ERROR: LoadError: Failed to precompile MLJBase [a7f614a8-145f-11e9-1d2a-a57a1082229d] to /home/irving/.julia/compiled/v1.6/MLJBase/jl_JmYT9b.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /home/irving/.julia/packages/MLJTuning/ykHCM/src/MLJTuning.jl:1
ERROR: LoadError: LoadError: Failed to precompile MLJTuning [03970b2e-30c4-11ea-3135-d1576263f10f] to /home/irving/.julia/compiled/v1.6/MLJTuning/jl_Xy0A7N.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
  [8] include(x::String)
    @ TreeParzen ~/.julia/packages/TreeParzen/uLavA/src/TreeParzen.jl:1
  [9] top-level scope
    @ ~/.julia/packages/TreeParzen/uLavA/src/TreeParzen.jl:22
 [10] include
    @ ./Base.jl:386 [inlined]
 [11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1235
 [12] top-level scope
    @ none:1
 [13] eval
    @ ./boot.jl:360 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [15] top-level scope
    @ none:1
in expression starting at /home/irving/.julia/packages/TreeParzen/uLavA/src/MLJTreeParzen.jl:1
in expression starting at /home/irving/.julia/packages/TreeParzen/uLavA/src/TreeParzen.jl:1
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Types.jl:55
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1265
 [3] precompile
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:921 [inlined]
 [4] #precompile#196
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919 [inlined]
 [5] precompile()
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:919
 [6] top-level scope
   @ REPL[3]:1

To Reproduce

] add TreeParzen

Expected behavior

TreeParzen is precompiled

Environment (please complete the following information):

kainkad commented 3 years ago

@irving-muller thanks for raising the issue. I'm looking into this as there seems to be a problem with dependencies. In the meantime you can ] add TreeParzen@v0.2.4 which compiles with no errors. Once the issue with dependencies is sorted I'll let you know.

kainkad commented 3 years ago

I had looked into this and it seems like this compilation issue is only for Julia 1.6+ version and seems to be failing on ScientificTypes, MLJBase which are used in TreeParzen for the MLJ API and tests. TreeParzen does install and otherwise works with Julia 1.6+ but it also should get these packages. To compare I have tested with Julia 1.5+ and it works without any compilation errors. It seems to be related to the changes made since updating dependencies for the 1.6 CI matrix. Below are the outputs for reference: For Julia 1.5+: image image

and for Julia 1.6+:

image

@ablaom I wonder if you could may be have some suggestions on what's best doing? I will look into this further but just comparing the versions this seems to only be affecting adding the package on Julia v1.6 and fails on compiling ScientificTypes and MLJBase. TreeParzen works otherwise on either Julia version.

ablaom commented 3 years ago

@irving-muller Thanks for reporting @kd-iqvia Thanks for the further investigation

I have an idea what the problem is, and it is indeed on the ScientificTypes end.

ERROR: LoadError: LoadError: UndefVarError: ArrayLikeVariate not defined

UnivariateLikeVariate is referenced in latest version of ScientificTypes. This type is from Distributions, but not defined until 0.25.1 (even thought breaking!) Unfortunately, the compat entry for Distributions in that version of ScientificTypes is 0.25.

So let's see if this helps:

ablaom commented 3 years ago

I just noticed that 2 days ago MLJBase bumped it's Distributions compat to 0.25.3. So maybe the issue is already resolved by that?

ablaom commented 3 years ago

Okay, I'm hopeful the problem will be resolved if TreeParzen bumps its Distributions compat to 0.25. It is still at 0.24.

I also highly recommend that the github action CompatHelper be installed for this repo so that such needed updates are flagged automatically. You put CompatHelper.yml file in your .github/workflows folder, like this one and setup the keys as explained here.

@kd-iqvia Can you bump the compat for Distributions and ping me if there is still an issue?

irving-muller commented 3 years ago

Hello @ablaom and @kd-iqvia. Thanks for the quick reply. While the issue is not fixed, I will follow @kd-iqvia suggestion and use an older version.

Sorry I misclicked the close button. :)

Thank you again!

kainkad commented 2 years ago

Hi @irving-muller just wanted to let you know that the recently released TreeParzenv0.2.7 works with Julia v1.6.0. and v1.6.2 by just ] add TreeParzen. There is a latest Julia 1.6.3 version from September 24th and I tested it in the meantime and while TPE works with it, there are some compilation issues with other dependencies so I'd suggest to stick to Julia 1.6.2 and give some time for other packages to get updated as it usually takes some time after new Julia releases. Thanks to compatibility helper PR from @ablaom we will be also in position to monitor the compatibility issues more efficiently. Unless, you'd like us to follow up more on this - let me know if you can consider this issue as closed.

irving-muller commented 2 years ago

Hello @kd-iqvia. Ok, thank you very much!!