Closed Sakurakdx closed 1 month ago
In addition, when I use set_format
and index the ds, the following error occurs:
the code
ds.set_format(type="np", colums="pixel_values")
error
Some people use the set_format function to convert the column back, but doesn't this lose precision?
Under the hood the data is saved in Arrow format using the same precision as your numpy arrays? By default the Arrow data is read as python lists, but you can indeed read them back as numpy arrays with the same precision
(you can fix your second issue by fixing the typo colums
-> columns
)
(you can fix your second issue by fixing the typo
colums
->columns
)
You are right, I was careless. Thank you.
Some people use the set_format function to convert the column back, but doesn't this lose precision?
Under the hood the data is saved in Arrow format using the same precision as your numpy arrays? By default the Arrow data is read as python lists, but you can indeed read them back as numpy arrays with the same precision
Yes, after testing I found that there was no loss of precision. Thanks again for your answer.
Describe the bug
When I use the
map
function to convert images into features, datasets saves nparray as a list. Some people use theset_format
function to convert the column back, but doesn't this lose precision?Steps to reproduce the bug
the map function
main function
Expected behavior
(type < list>)
Environment info
datasets
version: 2.16.1huggingface_hub
version: 0.23.4fsspec
version: 2023.10.0