Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

verify_images not deleting the image #48

Closed
muellerzr opened this issue Jan 15, 2020 · 3 comments
Closed

verify_images not deleting the image #48

muellerzr opened this issue Jan 15, 2020 · 3 comments

Comments

@muellerzr
Copy link
Contributor

When I run verify_images like so:

path_b = Path('birds/blue_bird')
verify_images(path_b.ls())

It will show that there is a bad image at 'birds/blue_bird/00000047.jpg') however it never winds up deleting said image.

@muellerzr
Copy link
Contributor Author

Looking at the source code it seems deleting is a part of verify_images. Is this intentional?

@sgugger
Copy link
Contributor

sgugger commented Jan 15, 2020

Yes, verify_images only verify the images now. Since it returns the ones that don't open, you can then do

failed = verify_images(fnames)
failed.map(Path.unlink)

I didn't get any time to update the course notebook but will do soon.

@sgugger sgugger closed this as completed Jan 15, 2020
@muellerzr
Copy link
Contributor Author

Thank you! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants