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

MethodError: vcat(::ReverseDiff.TrackedArray{Float32, Float32, 2, Matrix{Float32}, Matrix{Float32}}, ::Matrix{Float32}) is ambiguous. #345

Closed
prbzrg opened this issue Nov 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed upstream

Comments

@prbzrg
Copy link
Member

prbzrg commented Nov 12, 2023

Error:

  MethodError: vcat(::ReverseDiff.TrackedArray{Float32, Float32, 2, Matrix{Float32}, Matrix{Float32}}, ::Matrix{Float32}) is ambiguous.
  
  Candidates:
    vcat(x::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, xs::AbstractMatrix...)
      @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/arrays.jl:53
    vcat(X1::Union{Number, AbstractVecOrMat{<:Number}}, X::Union{Number, AbstractVecOrMat{<:Number}}...)
      @ SparseArrays /opt/hostedtoolcache/julia/1.10.0-rc1/x64/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1235
    vcat(x::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, xs::AbstractVecOrMat...)
      @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/arrays.jl:53
  
  Possible fix, define
    vcat(::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, ::Vararg{AbstractMatrix{<:Number}})

Ref:
https://github.com/impICNF/ContinuousNormalizingFlows.jl/actions/runs/6837454027/job/18593483086#step:5:21513

@prbzrg
Copy link
Member Author

prbzrg commented Nov 12, 2023

Reported in JuliaDiff/ReverseDiff.jl#242

@prbzrg prbzrg added bug Something isn't working help wanted Extra attention is needed labels Nov 12, 2023
@prbzrg prbzrg self-assigned this Dec 1, 2023
@prbzrg
Copy link
Member Author

prbzrg commented Dec 1, 2023

@prbzrg
Copy link
Member Author

prbzrg commented Jan 18, 2024

New error:

  Test threw exception
  Expression: !(isnothing(ReverseDiff.gradient(diff2_loss, r)))
  MethodError: vcat(::ReverseDiff.TrackedArray{Float32, Float32, 2, Matrix{Float32}, Matrix{Float32}}, ::Matrix{ReverseDiff.TrackedReal{Float32, Float32, ReverseDiff.TrackedArray{Float32, Float32, 2, Matrix{Float32}, Matrix{Float32}}}}) is ambiguous.
  
  Candidates:
    vcat(x::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, xs::AbstractMatrix...)
      @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/arrays.jl:53
    vcat(X1::Union{Number, AbstractVecOrMat{<:Number}}, X::Union{Number, AbstractVecOrMat{<:Number}}...)
      @ SparseArrays /opt/hostedtoolcache/julia/1.10.0/x64/share/julia/stdlib/v1.10/SparseArrays/src/sparsevector.jl:1235
    vcat(x::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, xs::AbstractVecOrMat...)
      @ ReverseDiff ~/.julia/packages/ReverseDiff/UJhiD/src/derivatives/arrays.jl:53
  
  Possible fix, define
    vcat(::ReverseDiff.TrackedArray{V, D, 2} where {V, D}, ::Vararg{AbstractMatrix{<:Number}})
  

@prbzrg prbzrg closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed upstream
Projects
None yet
Development

No branches or pull requests

1 participant