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

bug w/ hf_load_dataset #25

Open
DataStrategist opened this issue Aug 3, 2022 · 1 comment
Open

bug w/ hf_load_dataset #25

DataStrategist opened this issue Aug 3, 2022 · 1 comment

Comments

@DataStrategist
Copy link

Hi all! I'm Amit from R4ds :)

Anyway, was giving this repo a go, and trying to run the example on the readme, and hitting this bug:

> emotion <- hf_load_dataset(  "emotion",
+   split = "test",
+   as_tibble = TRUE,
+   label_name = "int2str"
+ )
Using custom data configuration default
Reusing dataset emotion (C:\Users\mexin\.cache\huggingface\datasets\emotion\default\0.0.0\348f63ca8e27b3713b6c04d723efe6d824a56fb3d1449794716c0f0296072705)
100%|██████████| 3/3 [00:00<00:00, 600.13it/s]
Using custom data configuration default
Reusing dataset emotion (C:\Users\mexin\.cache\huggingface\datasets\emotion\default\0.0.0\348f63ca8e27b3713b6c04d723efe6d824a56fb3d1449794716c0f0296072705)
Error in as.integer(hf_data$label) : 
  cannot coerce type 'environment' to vector of type 'integer'

Chased the error to here:

hf_data <- tibble::tibble(reticulate::py$load_dataset("emotion", split = split)$to_pandas())
. However, restarting session cleared it right up. Maybe first-time use pains? Will continue to monitor it.

@jpcompartir
Copy link
Collaborator

Hey Amit, sorry we missed this - we've all had a pretty busy summer and are just now getting a bit of time to push the first release over the line. Have you been able to recreate the error?

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

No branches or pull requests

2 participants