Skip to content

I can not load the saved model, an example from the help #109

@mytarmail

Description

@mytarmail

I am getting an error on the last line of code

library(uwot)
iris_train <- iris[c(1:10, 51:60), ]
iris_test <- iris[100:110, ]
model <- umap(iris_train, ret_model = TRUE, n_epochs = 20)
model_file <- tempfile("iris_umap")
model <- save_uwot(model, file = model_file)
test_embedding <- umap_transform(iris_test, model)
unload_uwot(model)
model2 <- load_uwot(file = model_file)

/usr/bin/tar: Cannot connect to C: resolve failed
Error in load_uwot(file = model_file) : 
  Can't find model in C:\Users\tars\AppData\Local\Temp\RtmpaKVSbs\iris_umap12e43e764309
In addition: Warning message:
In utils::untar(abspath(file), exdir = mod_dir, verbose = verbose) :
  ‘tar.exe -xf "C:\Users\tars\AppData\Local\Temp\RtmpaKVSbs/iris_umap12e43e764309" -C "C:/Users/tars/AppData/Local/Temp/RtmpaKVSbs/dir12e44c065145"’ returned error code 128

the model definitely exists.

sessionInfo()
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

time zone: Europe/Kiev
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RcppAnnoy_0.0.20 uwot_0.1.14      Matrix_1.5-4    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions