una-dinosauria / Rayuela.jl

Code for my PhD thesis. Library of quantization-based methods for fast similarity search in high dimensions. Presented at ECCV 18.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MethodError: no method matching repick_unused_centers

jingtaozhan opened this issue · comments

I follow the instructions and run the first demo, but I got an error during training RVQ:

ERROR: LoadError: MethodError: no method matching repick_unused_centers(::Array{Float32,2}, ::Array{Float32,1}, ::Array{Float32,2}, ::Array{Int64,1})
Closest candidates are:
  repick_unused_centers(::AbstractArray{#s108,2} where #s108<:Real, ::Array{#s107,1} where #s107<:Real, ::AbstractArray{#s106,2} where #s106<:AbstractFloat, ::Array{Int64,1}, ::Distances.SemiMetric) at /home/zjt/.julia/packages/Clustering/tt9vc/src/kmeans.jl:377
Stacktrace:
 [1] quantize_rvq(::Array{Float32,2}, ::Array{Array{Float32,2},1}, ::Bool) at /home/zjt/.julia/dev/Rayuela/src/RVQ.jl:51
 [2] experiment_rvq(::Array{Float32,2}, ::Array{Float32,2}, ::Array{Float32,2}, ::Array{UInt32,1}, ::Int64, ::Int64, ::Int64, ::Int64, ::Bool) at /home/zjt/.julia/dev/Rayuela/src/RVQ.jl:142
 [3] run_demos(::String, ::Int64, ::Int64, ::Int64, ::Int64) at /home/zjt/.julia/dev/Rayuela/demos/demos_train_query_base.jl:41
 [4] top-level scope at /home/zjt/.julia/dev/Rayuela/demos/demos_train_query_base.jl:171 [inlined]
 [5] top-level scope at ./none:0
 [6] include at ./boot.jl:317 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1044
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] include(::String) at ./client.jl:392
 [10] top-level scope at none:0
in expression starting at /home/zjt/.julia/dev/Rayuela/demos/demos_train_query_base.jl:170

No worries! I think this is because the method repick_unused_centers is out of date, and now receives a distance Distances.SqEuclidean as the last parameter. Lemme give it a try!

Btw -- what julia version are you using? I am putting together a Docker image to make sure these reproducibility issues don't happen again.

It's very nice of you!
The version is 1.0.4. I also tried with version 1.1 but no luck.

#48 might close this. Could you please give it a try? If so, I'll merge tomorrow morning.

This and the previous fix should also kind of show the pattern to solve other issues.

#47 has the docker image I'm using. I think I see issue #46 there as well, which is great because that means we can reproduce the issues!

Sorry about this, it's only recently that I've become more comfortable with docker.

Thank you, It works! After I additionally passed Distances.SqEuclidean() to the function. RVQ and ERVQ are OK now!