-
Notifications
You must be signed in to change notification settings - Fork 89
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
allequal
Compat issue with recent commit?
#598
Comments
That's surprising. Did it say julia> @macroexpand1 @non_differentiable allequal(::Any)
quote
#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:383 =#
begin
function (::(ChainRulesCore.Core).kwftype(ChainRulesCore.typeof((ChainRulesCore.ChainRulesCore).frule)))(#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:404 =# @nospecialize(var"##kwargs#423"::Any), var"#1553#frule"::ChainRulesCore.typeof((ChainRulesCore.ChainRulesCore).frule), #= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:406 =# @nospecialize(::Any), ::(Core).Typeof(allequal), var"##422"::Any)
return (allequal(var"##422"; var"##kwargs#423"...), ChainRulesCore.NoTangent())
end
function (ChainRulesCore.ChainRulesCore).frule(#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:412 =# @nospecialize(::Any), ::(Core).Typeof(allequal), var"##422"::Any)
#= REPL[58]:1 =#
return (allequal(var"##422"), ChainRulesCore.NoTangent())
end
end
#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:384 =#
begin
function (::(ChainRulesCore.Core).kwftype(ChainRulesCore.typeof(ChainRulesCore.rrule)))(var"##kwargs#424"::ChainRulesCore.Any, ::ChainRulesCore.typeof(ChainRulesCore.rrule), ::(Core).Typeof(allequal), var"##422"::Any)
return (allequal(var"##422"; var"##kwargs#424"...), begin
function allequal_pullback(#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:439 =# @nospecialize(_))
return (NoTangent(), NoTangent())
end
end)
end
function (ChainRulesCore.ChainRulesCore).rrule(::(Core).Typeof(allequal), var"##422"::Any)
#= REPL[58]:1 =#
return (allequal(var"##422"), begin
function allequal_pullback(#= /Users/me/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:439 =# @nospecialize(_))
return (NoTangent(), NoTangent())
end
end)
end
end
end |
Sorry, I just looked a bit and I think I lost the error messages. The error definitely said that ChainRules failed to build and cited not recognizing I also incorrectly wrote Maybe I caused ChainRules not to build myself by creating an inconsistent project environment or something like that. I'm happy to close this if it looks okay to you. |
CI is 1.7.2, and I tried 1.7.0 and didn't see problems. Glad if it works now! |
I can recreate this in 1.7.1: julia> VERSION
v"1.7.1"
(@v1.7) pkg> activate --temp
Activating new project at `/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_gugiKX`
(jl_gugiKX) pkg> add ChainRules
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/private/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_gugiKX/Project.toml`
[082447d4] + ChainRules v1.28.0
Updating `/private/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_gugiKX/Manifest.toml`
[082447d4] + ChainRules v1.28.0
[d360d2e6] + ChainRulesCore v1.13.0
[34da2185] + Compat v3.42.0
[92d709cd] + IrrationalConstants v0.1.1
[c1ae055f] + RealDot v0.1.0
[0dad84c5] + ArgTools
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[f43a241f] + Downloads
[b77e0a4c] + InteractiveUtils
[b27032c2] + LibCURL
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[a63ad114] + Mmap
[ca575930] + NetworkOptions
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[1a1011a3] + SharedArrays
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[10745b16] + Statistics
[fa267f1f] + TOML
[a4e569a6] + Tar
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll
[deac9b47] + LibCURL_jll
[29816b5a] + LibSSH2_jll
[c8ffd9c3] + MbedTLS_jll
[14a3606d] + MozillaCACerts_jll
[4536629a] + OpenBLAS_jll
[83775a58] + Zlib_jll
[8e850b90] + libblastrampoline_jll
[8e850ede] + nghttp2_jll
[3f19e933] + p7zip_jll
julia> using ChainRules
[ Info: Precompiling ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2]
ERROR: LoadError: UndefVarError: allequal not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:383
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ ChainRules ~/.julia/packages/ChainRules/0HWSq/src/ChainRules.jl:1
[4] top-level scope
@ ~/.julia/packages/ChainRules/0HWSq/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::Nothing)
@ 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 /Users/funks/.julia/packages/ChainRules/0HWSq/src/rulesets/Base/nondiff.jl:99
in expression starting at /Users/funks/.julia/packages/ChainRules/0HWSq/src/ChainRules.jl:1
ERROR: Failed to precompile ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2] to /Users/funks/.julia/compiled/v1.7/ChainRules/jl_cFBACB.
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: This currently also breaks Flux. |
Have you tried I can't reproduce the issue I'm afraid :( |
Also happens to me on 1.7.2 on macOS. julia> VERSION
v"1.7.2"
(@v1.7) pkg> activate --temp
Activating new project at `/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_Z0xCP0`
(jl_Z0xCP0) pkg> add ChainRules
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `/private/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_Z0xCP0/Project.toml`
[082447d4] + ChainRules v1.28.0
Updating `/private/var/folders/74/wcz8c9qs5dzc8wgkk7839k5c0000gn/T/jl_Z0xCP0/Manifest.toml`
[082447d4] + ChainRules v1.28.0
[d360d2e6] + ChainRulesCore v1.13.0
[34da2185] + Compat v3.42.0
[92d709cd] + IrrationalConstants v0.1.1
[c1ae055f] + RealDot v0.1.0
[0dad84c5] + ArgTools
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[f43a241f] + Downloads
[b77e0a4c] + InteractiveUtils
[b27032c2] + LibCURL
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[a63ad114] + Mmap
[ca575930] + NetworkOptions
[44cfe95a] + Pkg
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[1a1011a3] + SharedArrays
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[10745b16] + Statistics
[fa267f1f] + TOML
[a4e569a6] + Tar
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll
[deac9b47] + LibCURL_jll
[29816b5a] + LibSSH2_jll
[c8ffd9c3] + MbedTLS_jll
[14a3606d] + MozillaCACerts_jll
[4536629a] + OpenBLAS_jll
[83775a58] + Zlib_jll
[8e850b90] + libblastrampoline_jll
[8e850ede] + nghttp2_jll
[3f19e933] + p7zip_jll
julia> using ChainRules
[ Info: Precompiling ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2]
ERROR: LoadError: UndefVarError: allequal not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/ChainRulesCore/IzITE/src/rule_definition_tools.jl:383
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ ChainRules ~/.julia/packages/ChainRules/0HWSq/src/ChainRules.jl:1
[4] top-level scope
@ ~/.julia/packages/ChainRules/0HWSq/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::Nothing)
@ 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 /Users/funks/.julia/packages/ChainRules/0HWSq/src/rulesets/Base/nondiff.jl:99
in expression starting at /Users/funks/.julia/packages/ChainRules/0HWSq/src/ChainRules.jl:1
ERROR: Failed to precompile ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2] to /Users/funks/.julia/compiled/v1.7/ChainRules/jl_TFrmc3.
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 |
Maybe this is due to my startup.jl?
|
Ok, this issue can stay closed. Somehow Compat Thanks for the help! :) Edit: This wasn't an issue with Compat either, but with an older version of JuliaFormatter in my startup.jl! |
Building on @adrhill's comments, I'm beginning to encounter this on Julia v1.7.2 through |
This is really strange. I wonder why it doesn't happen with anything else using Compat -- do any of these packages define their own Does it still occur if with |
I cannot reproduce the error after successfully precompiling outside of my IDE. So, I can't try your suggestions @mcabbott. Below is the script of what I've tried within the IDE to reproduce the error. cd(@__DIR__)
run(`rm Manifest.toml`)
run(`rm Project.toml`)
run(`rm -r $(homedir())/.julia/compiled/v1.7/Zygote`)
run(`rm -r $(homedir())/.julia/compiled/v1.7/ChainRules`)
run(`rm -r $(homedir())/.julia/compiled/v1.7/ChainRulesCore`)
import Pkg
Pkg.activate(@__DIR__)
Pkg.add("ChainRules")
# Pkg.develop("ChainRules")
Pkg.add("Zygote")
using Zygote My more complex projects are now loading |
I also faced this issue. Here is my environment for reproducibility:
|
Hi, I do have this issue, too, using Julia 1.7.2. Just wanted to add the specific info about when it breaks for me.
breaks and gives the error with When first activating environment, then loading Flux/ChainRules, everything works fine. I also not not know which package to update (as for others it was fixed by updating), my packages are updated as much as they can, I do need some lower versions because of dependencies. My
|
This feels like a bug in julia itself. Because order of loading shouldn't have an effect on what is defined inside Base... |
At least for me, ChainRules failed to build on Julia v1.7.1 after pulling the latest changes from #597 last night. The error messages (sorry I didn't copy) mentioned that the recently added
Base.allequal
(julia #43354) is unrecognized. Possibly an issue withCompat
controls, related to this comment in the PR? @mcabbott @niklasschmitz @mzgubicMaybe it's just me, sorry to bother if so. I took this as a sign I should build v1.7.2
The text was updated successfully, but these errors were encountered: