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

Unable to precompile -- "allequal not defined" #1934

Open
zornsllama opened this issue Apr 7, 2022 · 7 comments
Open

Unable to precompile -- "allequal not defined" #1934

zornsllama opened this issue Apr 7, 2022 · 7 comments

Comments

@zornsllama
Copy link

When I attempt to add and precompile Flux, I receive the error LoadError: UndefVarError: allequal not defined. This problem persists when creating a new environment and adding just Flux, so it seems it's not just a weird dependency issue? Any help would be greatly appreciated!

@ToucheSir
Copy link
Member

Do you have anything in your global environment?

@zornsllama
Copy link
Author

Yes, is there any way to pin down what might be causing a conflict?

@darsnack
Copy link
Member

darsnack commented Apr 7, 2022

Probably due to JuliaDiff/ChainRules.jl#598
The main issue seems to be finding a reliable reproducer.
cc @mcabbott

@mcabbott
Copy link
Member

Yes to the CR 598 issue. Unfortunately nobody seems to be able to reproduce this.

If it happens reliably in your setup @zornsllama, try ] dev-ing ChainRules, and check it still happens. Then edit the this line to say @non_differentiable Compat.allequal(::Any). Or perhaps

@static if isdefined(Compat, :allequal)
    @non_differentiable Compat.allequal(::Any)
end

These steps shouldn't harm anything, but it's possible they may avoid whatever is causing this.

@KronosTheLate
Copy link
Contributor

KronosTheLate commented May 3, 2022

I also faced this issue. Here is my environment for reproducibility:

(DennisBachelorProject) pkg> st
      Status `~/DennisBachelorProject/Project.toml`
  [cbdf2221] AlgebraOfGraphics v0.6.4
  [fbb218c0] BSON v0.3.5
  [a80a1652] BenchmarkHistograms v0.2.0
  [5d742f6a] CSVFiles v1.0.1
  [052768ef] CUDA v3.8.3
  [324d7699] CategoricalArrays v0.10.5
  [a93c6f00] DataFrames v1.3.2
  [31c24e10] Distributions v0.25.49
  [634d3b9d] DrWatson v2.9.1
  [587475ba] Flux v0.13.0
  [e9467ef8] GLMakie v0.5.5
  [93e5fe13] Hyperopt v0.5.5
  [033835bb] JLD2 v0.4.22
  [eb30cadb] MLDatasets v0.5.15
  [20f20a25] MakieCore v0.2.1
  [429524aa] Optim v1.6.2
  [b98c9c47] Pipe v1.3.0
  [27ebfcd6] Primes v0.5.1
  [92933f4c] ProgressMeter v1.7.1
  [295af30f] Revise v3.3.1
  [35248bf2] SampledVectors v0.1.1
  [22787eb5] Term v0.3.0
  [a759f4b9] TimerOutputs v0.5.16
  [75d8cae4] Tools v0.1.0 `https://github.com/KronosTheLate/Tools.jl#main`
  [b8865327] UnicodePlots v2.10.3
  [98cad3c8] ValueHistories v0.5.4
  [e88e6eb3] Zygote v0.6.34

julia> using Pkg; pkg"instantiate"

julia> using Flux
[ Info: Precompiling Flux [587475ba-b771-5e3f-ad9e-33799f191a9c]
ERROR: LoadError: UndefVarError: allequal not defined
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/ChainRulesCore/RbX5a/src/rule_definition_tools.jl:383
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [3] include(x::String)
    @ ChainRules ~/.julia/packages/ChainRules/XWY2g/src/ChainRules.jl:1
  [4] top-level scope
    @ ~/.julia/packages/ChainRules/XWY2g/src/ChainRules.jl:24
  [5] include
    @ ./Base.jl:418 [inlined]
  [6] 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:1318
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:373 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [10] top-level scope
    @ none:1
in expression starting at /home/legolas/.julia/packages/ChainRules/XWY2g/src/rulesets/Base/nondiff.jl:99
in expression starting at /home/legolas/.julia/packages/ChainRules/XWY2g/src/ChainRules.jl:1
ERROR: LoadError: Failed to precompile ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2] to /home/legolas/.julia/compiled/v1.7/ChainRules/jl_GK0j38.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [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:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/legolas/.julia/packages/Zygote/FPUm3/src/Zygote.jl:1
ERROR: LoadError: Failed to precompile Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] to /home/legolas/.julia/compiled/v1.7/Zygote/jl_U8Q3Un.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [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::Nothing)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /home/legolas/.julia/packages/Flux/18YZE/src/Flux.jl:1
ERROR: Failed to precompile Flux [587475ba-b771-5e3f-ad9e-33799f191a9c] to /home/legolas/.julia/compiled/v1.7/Flux/jl_SkU4Wn.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

EDIT:
I did pkg"up". At first, I got the same error. But now, things seem to work.

@ToucheSir
Copy link
Member

Can you confirm that this is not a case of JuliaDiff/ChainRulesCore.jl#553 (comment)?

@KronosTheLate
Copy link
Contributor

I have, as mentioned in the edit, since updated all packages and thing are working now. So I am unable to do further tests without instantiating the same env. And unfortunately, I simply have more pressing things to do right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants