You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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) using kagglehub.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?
The text was updated successfully, but these errors were encountered:
I agree with @Montekkundan for what concerns the confusing naming choice. @Montekkundan , you can define the download destination by changing the KAGGLEHUB_CACHE environment variable:
When using
kagglehub.dataset_download
, thepath
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:
this results in a 404 error
i tried with
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../data
or the current working directory) usingkagglehub.dataset_download
?destination
) for specifying a custom download location for the entire dataset?The text was updated successfully, but these errors were encountered: