LuxDL / Lux.jl

Elegant & Performant Scientific Machine Learning in Julia
https://lux.csail.mit.edu/
MIT License
446 stars 50 forks source link

`rrule` for `Base.merge` defined in `ChainRulesCore` #678

Closed vpuri3 closed 1 month ago

vpuri3 commented 1 month ago

Looks like this code needs to be removed

https://github.com/LuxDL/Lux.jl/blob/9e9cab8e80df423f845b0827f6b8afc1b4f85534/src/chainrules.jl#L17-L27

as https://github.com/JuliaDiff/ChainRules.jl/commit/fa7f88494de9f024f084743af721c8fd977b5991 has been merged.

I'm getting the following error right now

[ Info: Precompiling NeuralROMs [33bcc084-233e-4094-a32f-d925c598ad0c]                                                                                                                                                                                       
WARNING: Method definition rrule(typeof(Base.merge), T1, T2) where {T1<:(NamedTuple{names, T} where T<:Tuple where names), T2<:(NamedTuple{names, T} where T<:Tuple where names)} in module Lux at /home/vedantpu/.julia/packages/Lux/XAk1A/src/chainrules.jl
:17 overwritten in module ChainRules at /home/vedantpu/.julia/packages/ChainRules/qJ76i/src/rulesets/Base/base.jl:313.                                                                                                                                       
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.                                                                                                                           
[ Info: Skipping precompilation since __precompile__(false). Importing NeuralROMs [33bcc084-233e-4094-a32f-d925c598ad0c].                                                                                                                                    
Precompiling LuxZygoteExt                                                                                                                                                                                                                                    
        Info Given LuxZygoteExt was explicitly requested, output will be shown live                                                                                                                                                                          
WARNING: Method definition rrule(typeof(Base.merge), T1, T2) where {T1<:(NamedTuple{names, T} where T<:Tuple where names), T2<:(NamedTuple{names, T} where T<:Tuple where names)} in module Lux at /home/vedantpu/.julia/packages/Lux/XAk1A/src/chainrules.jl
:17 overwritten in module ChainRules at /home/vedantpu/.julia/packages/ChainRules/qJ76i/src/rulesets/Base/base.jl:313.                                                                                                                                       
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.                                                                                                                           
  ? Lux → LuxZygoteExt                                                                                                                                                                                                                                       
[ Info: Precompiling LuxZygoteExt [df13723f-0f22-5fb0-8a8f-885eac2ce1ee]                                                                                                                                                                                     
WARNING: Method definition rrule(typeof(Base.merge), T1, T2) where {T1<:(NamedTuple{names, T} where T<:Tuple where names), T2<:(NamedTuple{names, T} where T<:Tuple where names)} in module Lux at /home/vedantpu/.julia/packages/Lux/XAk1A/src/chainrules.jl
:17 overwritten in module ChainRules at /home/vedantpu/.julia/packages/ChainRules/qJ76i/src/rulesets/Base/base.jl:313.                                                                                                                                       
ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.                                                                                                                           
[ Info: Skipping precompilation since __precompile__(false). Importing LuxZygoteExt [df13723f-0f22-5fb0-8a8f-885eac2ce1ee].