mlverse / luz

Higher Level API for torch
https://mlverse.github.io/luz/
Other
85 stars 13 forks source link

cpp_tensor_from_buffer error #144

Open maxwell-geospatial opened 6 months ago

maxwell-geospatial commented 6 months ago

After training a model using the luz_callback_model_checkpoint() function then loading the checkpoint using luz_load_checkpoint(), I am receiving the following error:

Error in cpp_tensor_from_buffer(buffer, shape, list(dtype = dtype)) : Not compatible with requested type: [type=list; target=double].

Interestingly, the same code using the same input data will run fine on another computer.

Any thoughts on what might be causing this error? Here is some version info on the computer in which the error is occuring:

R version 4.4.0 (2024-04-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 22621)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C LC_TIME=English_United States.utf8

time zone: America/Los_Angeles tzcode source: internal

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

other attached packages: [1] geodl_0.1.0 ggplot2_3.5.1 luz_0.4.0 torch_0.12.0 dplyr_1.1.4

loaded via a namespace (and not attached): [1] gtable_0.3.5 xfun_0.43 htmlwidgets_1.6.4 devtools_2.4.5 remotes_2.5.0 processx_3.8.4 callr_3.7.6
[8] vctrs_0.6.5 tools_4.4.0 ps_1.7.6 safetensors_0.1.2 generics_0.1.3 curl_5.2.1 tibble_3.2.1
[15] fansi_1.0.6 pkgconfig_2.0.3 desc_1.4.3 lifecycle_1.0.4 farver_2.1.1 compiler_4.4.0 stringr_1.5.1
[22] progress_1.2.3 munsell_0.5.1 terra_1.7-71 codetools_0.2-20 httpuv_1.6.15 htmltools_0.5.8.1 usethis_2.2.3
[29] yaml_2.3.8 later_1.3.2 pillar_1.9.0 crayon_1.5.2 urlchecker_1.0.1 ellipsis_0.3.2 cachem_1.0.8
[36] sessioninfo_1.2.2 mime_0.12 tidyselect_1.2.1 digest_0.6.35 stringi_1.8.4 purrr_1.0.2 labeling_0.4.3
[43] fastmap_1.1.1 grid_4.4.0 colorspace_2.1-0 cli_3.6.2 magrittr_2.0.3 pkgbuild_1.4.4 utf8_1.2.4
[50] withr_3.0.0 prettyunits_1.2.0 scales_1.3.0 promises_1.3.0 bit64_4.0.5 rmarkdown_2.26 bit_4.0.5
[57] hms_1.1.3 evaluate_0.23 memoise_2.0.1 shiny_1.8.1.1 knitr_1.46 torchvision_0.5.1 miniUI_0.1.1.1
[64] profvis_0.3.8 rlang_1.1.3 Rcpp_1.0.12 zeallot_0.1.0 xtable_1.8-4 glue_1.7.0 coro_1.0.4
[71] pkgload_1.3.4 rstudioapi_0.16.0 jsonlite_1.8.8 R6_2.5.1 fs_1.6.4