farach / huggingfaceR

Hugging Face state-of-the-art models in R
Other
142 stars 17 forks source link

`hf_load_dataset()` error #49

Closed statkclee closed 1 year ago

statkclee commented 1 year ago

I tried to download dataset, but it's not working

> emo <- hf_load_dataset(
   dataset = "emo", 
   split = "train", 
   as_tibble = TRUE, 
   label_name = "int2str"
   )
Error in hf_load_dataset(dataset = "emo", split = "train", as_tibble = TRUE,  : 
  unused arguments (as_tibble = TRUE, label_name = "int2str")
> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

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

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

other attached packages:
[1] reticulate_1.28-9000 huggingfaceR_0.1.0  

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.0  xfun_0.37         remotes_2.4.2     purrr_1.0.1       lattice_0.20-45  
 [6] vctrs_0.5.2       generics_0.1.3    miniUI_0.1.1.1    htmltools_0.5.4   usethis_2.1.6    
[11] utf8_1.2.3        rlang_1.0.6       pkgbuild_1.4.0    later_1.3.0       urlchecker_1.0.1 
[16] pillar_1.8.1      glue_1.6.2        withr_2.5.0       rappdirs_0.3.3    sessioninfo_1.2.2
[21] lifecycle_1.0.3   stringr_1.5.0     devtools_2.4.5    htmlwidgets_1.6.1 memoise_2.0.1    
[26] knitr_1.42        callr_3.7.3       fastmap_1.1.0     httpuv_1.6.8      ps_1.7.2         
[31] curl_4.3.3        fansi_1.0.4       Rcpp_1.0.10       xtable_1.8-4      promises_1.2.0.1 
[36] cachem_1.0.6      desc_1.4.2        pkgload_1.3.2     jsonlite_1.8.4    mime_0.12        
[41] fs_1.6.1          png_0.1-8         digest_0.6.31     stringi_1.7.12    processx_3.8.0   
[46] dplyr_1.1.0       shiny_1.7.4       grid_4.2.2        rprojroot_2.0.3   cli_3.6.0        
[51] tools_4.2.2       magrittr_2.0.3    tibble_3.1.8      profvis_0.3.7     pkgconfig_2.0.3  
[56] crayon_1.5.2      ellipsis_0.3.2    Matrix_1.5-1      prettyunits_1.1.1 rstudioapi_0.14  
[61] R6_2.5.1          compiler_4.2.2 
jpcompartir commented 1 year ago

Hi @statkclee That's a generic error message in R which says that you're entering arguments the function does not accept. If you take a look at ?hf_load_dataset function's help, you'll notice that it has been reworked:

hf_load_dataset( dataset, split = NULL, label_conversion = c("str2int", "int2str") )

i.e. the arguments: as_tibble = TRUE, label_name = "int2str"

have been removed, as the function is now more opinionated about what it returns.