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: no method matching repick_unused_centers #45

Closed
jingtaozhan opened this issue Aug 19, 2021 · 4 comments · Fixed by #48
Closed

MethodError: no method matching repick_unused_centers #45

jingtaozhan opened this issue Aug 19, 2021 · 4 comments · Fixed by #48

Comments

@jingtaozhan
Copy link

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
@una-dinosauria
Copy link
Owner

una-dinosauria commented Aug 19, 2021

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.

@jingtaozhan
Copy link
Author

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

una-dinosauria added a commit that referenced this issue Aug 19, 2021
@una-dinosauria
Copy link
Owner

#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.

@jingtaozhan
Copy link
Author

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

una-dinosauria added a commit that referenced this issue Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants