-
Notifications
You must be signed in to change notification settings - Fork 31
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
Model loading is incompatible with newer RcppAnnoy #31
Comments
0.1.4 is now on CRAN with this fix. Thanks to Dirk and Erik for their assistance on this one. |
Hi! Maybe this issue is not completly solved. Using R 3.6.0 and uwot 0.1.5 I can save a model but get a error on load the same model: If I try the uwot version 0.1.3 I can load the model with no problems (the model created with 0.1.5 uwot version) What I´m doing wrong? Thanks, EDIT: |
Can you provide the commands you ran? |
Hi, Create the model: Thanks, |
Does it make a difference if you do: # Create the model:
model <- uwot::umap(X = ff, scale = TRUE, n_threads = 4, init = "spectral",
metric = "euclidean", ret_model = TRUE)
model_file <- tempfile("mymodel")
# Save the model:
uwot::save_uwot(model, file = model_file)
# Load the model:
model2 <- uwot::load_uwot(file = model_file) I have discovered there are lots of problems with |
Hi, |
So, Test load uwot in R 3.6.0 + RcppAnnoy 0.0.14 + uwot 0.1.13 -> error! I don't know why R 3.5.3 + RcppAnnoy 0.0.11 + uwot 0.1.13 works... |
Can you try with the latest R 3.6.x release, which is currently R 3.6.2? |
I will try R-3.6.2. Before this, some debuging: |
No that's probably not ok. This is a bug, sorry. Unfortunately this bug isn't something I have been able to reproduce so I missed it (weirdly the lack of a correct dimensionality still isn't biting me).
model$metric[[1]] <- length(model$scale_info$`scaled:nzvcols`) Hopefully that will work for your current case for now. |
Hi, Yes this solve the problem! But ann must be created with Any ETA for this changes appear on CRAN? I can use Thanks. |
Yes, you are again correct.
I don't know. There are several more problems with |
No problem. I can still use R 3.5.3. So. Many alternatives. Thanks a lot for this wonderfull package. Regards, |
Version 0.1.8 has made it to CRAN and this should be fixed now. Please re-open if problems persist. |
Dirk Eddelbuettel, RcppAnnoy author, has reached out to inform me of that a new version of RcppAnnoy is coming, backed with an updated version of Annoy.
Unfortunately, uwot's ability to load previously saved models is broken by these changes. It used to be possible to specify an arbitrary dimensionality when creating an index, and then loading a serialized Annoy model would overwrite that dimensionality to whatever the serialized index was supposed to have, e.g.:
Annoy author Erik Bernhardsson further pointed out that this should never have worked, which adds a little extra urgency to making a fix.
Fortunately, the information needed is readily to hand at load time, so this isn't a difficult (or backwards-compatibility breaking) fix.
The text was updated successfully, but these errors were encountered: