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

AxisArray and KeyedArray Nightly failures #96

Closed
glennmoy opened this issue Jun 29, 2021 · 1 comment · Fixed by #97
Closed

AxisArray and KeyedArray Nightly failures #96

glennmoy opened this issue Jun 29, 2021 · 1 comment · Fixed by #97
Labels

Comments

@glennmoy
Copy link
Member

https://github.com/invenia/FeatureTransforms.jl/actions/runs/981177222

In the first instance cat(::AxisArray, ::AxisArray) is being called for some reason. The method that's supposed to be called is cat(::AxisArray, ::Array) and I've verified this locally so I'm not sure why it's calling the wrong method on CI.

AxisArray, apply_append for FakeOneToOneTransform())

OneToOne: Error During Test at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:56
  Test threw exception
  Expression: FeatureTransforms.apply_append(x, T; append_dim=1) == vcat(x, ones(2, 3))
  ArgumentError: Categorical axes must be unique
  Stacktrace:
   [1] checkaxis(::Type{AxisArrays.Categorical}, ::Array{String,1}) at /home/runner/.julia/packages/AxisArrays/IFpjG/src/core.jl:584
   [2] checkaxis at /home/runner/.julia/packages/AxisArrays/IFpjG/src/core.jl:575 [inlined]
   [3] checkaxis(::Axis{:foo,Array{String,1}}) at /home/runner/.julia/packages/AxisArrays/IFpjG/src/core.jl:574
   [4] #cat#51(::Int64, ::typeof(cat), ::AxisArray{Int64,2,Array{Int64,2},Tuple{Axis{:foo,Array{String,1}},Axis{:bar,Array{Symbol,1}}}}, ::AxisArray{Int64,2,Array{Int64,2},Tuple{Axis{:foo,Array{String,1}},Axis{:bar,Array{Symbol,1}}}}) at /home/runner/.julia/packages/AxisArrays/IFpjG/src/combine.jl:23
   [5] #cat at ./none:0 [inlined]
   [6] #apply_append#6(::Int64, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(FeatureTransforms.apply_append), ::AxisArray{Int64,2,Array{Int64,2},Tuple{Axis{:foo,Array{String,1}},Axis{:bar,Array{Symbol,1}}}}, ::FakeOneToOneTransform) at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/src/apply.jl:121
   [7] (::FeatureTransforms.var"#kw##apply_append")(::NamedTuple{(:append_dim,),Tuple{Int64}}, ::typeof(FeatureTransforms.apply_append), ::AxisArray{Int64,2,Array{Int64,2},Tuple{Axis{:foo,Array{String,1}},Axis{:bar,Array{Symbol,1}}}}, ::FakeOneToOneTransform) at ./none:0
   [8] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:56
   [9] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [10] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:54
   [11] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [12] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:52
   [13] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1180

KeyedArray apply_append

This seems to be failing to equate Vector{Integer} with a Vector{Real} even though the values are the same

OneToOne: Test Failed at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:56
  Expression: FeatureTransforms.apply_append(x, T; append_dim=1) == vcat(x, ones(2, 3))
   Evaluated: [1 2 3; 4 5 6; 1 1 1; 1 1 1] == [1.0 2.0 3.0; 4.0 5.0 6.0; 1.0 1.0 1.0; 1.0 1.0 1.0]
Stacktrace:
 [1] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:56
 [2] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
 [3] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:54
 [4] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
 [5] top-level scope at /home/runner/work/FeatureTransforms.jl/FeatureTransforms.jl/test/types/xarray.jl:52
 [6] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1180

sanity checking

julia> [1 2 3; 4 5 6; 1 1 1; 1 1 1] == [1.0 2.0 3.0; 4.0 5.0 6.0; 1.0 1.0 1.0; 1.0 1.0 1.0]
true
@oxinabox
Copy link
Member

This seems to be failing to equate Vector{Integer} with a Vector{Real} even though the values are the same

Could you be hitting an array type that displays like an Array but actually is some other type, and overloadings == wrong?

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

Successfully merging a pull request may close this issue.

2 participants