Open
Description
When using kagglehub.dataset_download
, the path
parameter appears to be designed for downloading a specific file from the dataset rather than defining a destination directory on the user's machine. This creates confusion and limits functionality, especially when a user want to download the entire dataset directly to their current working directory or a specified folder.
For example, the following code:
import kagglehub
path = kagglehub.dataset_download("preritbhagat/stress-non-stress-images", path="./data")
print("Path to dataset files:", path)
this results in a 404 error
i tried with
import kagglehub
# Download latest version
path = kagglehub.dataset_download("preritbhagat/stress-non-stress-images" , path="FINAL_TFEID/FINALTFEID_NONSTRESS/f01_dfh_hx.jpg")
print("Path to dataset files:", path)
this downloads the single image, as documented in the docs of this function; where FINAL_TFEID/FINALTFEID_NONSTRESS/f01_dfh_hx.jpg
is the path of the file in that dataset.
- Is there currently a way to download an entire dataset to a specific directory (e.g.,
./data
or the current working directory) usingkagglehub.dataset_download
? - If not, would it be possible to enhance the function to include a parameter (e.g.,
destination
) for specifying a custom download location for the entire dataset?