Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to other image formats if JPEG generation fails #410

Merged
merged 7 commits into from
Jun 21, 2022
Merged

Conversation

mariosasko
Copy link
Contributor

@mariosasko mariosasko commented Jun 21, 2022

Fix #191

@mariosasko mariosasko marked this pull request as ready for review June 21, 2022 14:32
@mariosasko mariosasko requested a review from severo June 21, 2022 15:21
@severo
Copy link
Collaborator

severo commented Jun 21, 2022

Thanks! I'm adding tests, that I will send her

But still only with JPEG: the two test dataset still raise an exception.
Now it's a ValueError since we catch the OSError.
PNG is now used as a fallback format if the image cannot be written as a
JPEG file. Tests are updated
@severo
Copy link
Collaborator

severo commented Jun 21, 2022

After merging, refresh the affected datasets with:

DATASETS=(huggingface/documentation-images cppe-5 huggingface/task-page-images dog/punks elonmuskceo/wordle facebook/winoground TheoMrc/Zebrafish-AChE-Staining kingabzpro/savtadepth-flags-V2 loubnabnl/repo-images Chris1/cityscapes huggingnft/dooggies yogeshkulkarni/MidcurveNN huggan/few-shot-skulls xiaj/ds_test huggan/few-shot-flat-colored-patterns sudo-s/herbier_mesuem AlekseyKorshuk/dooggies huggingnft/boredapeyachtclub huggingnft/mutant-ape-yacht-club sbusso/fluf DeuxAllemagnes/Images evaluate/media wikimedia/wit_base AlekseyKorshuk/fluf-world-scenes-and-sounds araanbranco/cryptoweebs huggingnft/etherbears huggingnft/theshiboshis huggingnft/trippytoadznft imadd/water_dataset lukasmasuch/test lvwerra/repo-images laion/laion-synthetic-115m coyotte508/dataset Chris1/GTA5 Guldeniz/trimaps_dataset huggan/few-shot-moongate huggingnft/alpacadabraz MarlaR/dalle nateraw/hf-hub-walkthrough-assets AlekseyKorshuk/cryptopunks jakka/warehouse_part1)
for dataset in ${DATASETS[@]}; do curl -X POST https://datasets-server.huggingface.co/webhook -H 'Content-Type: application/json' -d '{"update": "datasets/'$dataset'"}'; done;

See #191 (comment)

Copy link
Collaborator

@severo severo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@severo
Copy link
Collaborator

severo commented Jun 21, 2022

See #367 for the failures in the e2e tests. They run perfectly locally (I swear!)

Capture d’écran 2022-06-21 à 18 24 37

@severo severo merged commit 0744f26 into main Jun 21, 2022
@severo severo deleted the fix-191 branch June 21, 2022 16:24
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.

Error with RGBA images
2 participants