Skip to content

Update organize_imagenet_webdataset.py#26

Open
tsagkas wants to merge 1 commit intorai-opensource:mainfrom
tsagkas:patch-1
Open

Update organize_imagenet_webdataset.py#26
tsagkas wants to merge 1 commit intorai-opensource:mainfrom
tsagkas:patch-1

Conversation

@tsagkas
Copy link
Copy Markdown

@tsagkas tsagkas commented Jun 3, 2025

Previously, the function failed with an unhandled FileNotFoundError when a shard did not yet exist, causing the script to crash on first run. I added FileNotFoundError to the exception handling clause to allow the function to return False in this case, enabling shard creation to proceed as intended.

This change ensures the script behaves correctly when starting from scratch and avoids unnecessary runtime errors.

Previously, the function failed with an unhandled FileNotFoundError when a shard did not yet exist, causing the script to crash on first run. I added FileNotFoundError to the exception handling clause to allow the function to return False in this case, enabling shard creation to proceed as intended.

This change ensures the script behaves correctly when starting from scratch and avoids unnecessary runtime errors.
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

Successfully merging this pull request may close these issues.

1 participant