-
Notifications
You must be signed in to change notification settings - Fork 411
Closed
Description
Problem Description
As a user, I'd like to understand why I could not download a demo dataset without having to parse through confusing error logs.
Expected behavior
The following lines are responsible for downloading demo datasets
Lines 174 to 182 in c3f97e5
| LOGGER.info( | |
| f"Downloading dataset '{dataset_name}' for modality '{modality}' from " | |
| f'{BUCKET_URL}/{dataset_prefix}' | |
| ) | |
| contents = _list_objects(dataset_prefix) | |
| zip_key = _find_data_zip_key(contents, dataset_prefix) | |
| zip_bytes = _get_data_from_bucket(zip_key) | |
| metadata_bytes = _get_first_v1_metadata_bytes(contents, dataset_prefix) |
We should wrap this in a try/catch and raise a more descriptive error for which part of the download failed. Did it fail to list the objects in the bucket, did it fail to download, were the permissions not enough?
- Try to catch and raise specific exceptions. You can have one catch all exception at the end that says something like:
Could not download dataset {dataset} from bucket {bucket}. Make sure the bucket name is correct. If the bucket is private, make sure to provide your credentials.
Additional context
You may have to try different bad parameters to see all the possible failures and know which specific error messages to catch.
Metadata
Metadata
Assignees
Labels
feature requestRequest for a new featureRequest for a new feature