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
Fix dataset features and dataset preview for HuggingFaceDatasetSaver #5135
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8c46071
to
9847253
Compare
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-5135-all-demos You can install the changes in this PR by running: pip install https://gradio-builds.s3.amazonaws.com/ec1760b21a9a7c00fd9ead9364f4a1a6199905c2/gradio-3.39.0-py3-none-any.whl |
repo_id=self.dataset_id, | ||
filename=path_in_repo, | ||
repo_type="dataset", | ||
if deserialized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing errors if the image was None
60ee2c9
to
1dca866
Compare
🎉 Chromatic build completed! There are 0 visual changes to review. |
f267b38
to
d780415
Compare
Taking a look! |
Thanks for the fix @freddyaboulton! I can confirm that the flagging does not error if the Image is Tested with some old demos and they continue to work. I ran your demo as well. Two things I noticed in the flagged dataset: https://huggingface.co/datasets/abidlabs/chatinterface_with_image_csv
|
to have images in the dataset viewer, the column has to use the Image type (currently, it's "string", so we display a string). More details here: https://huggingface.co/docs/datasets/image_dataset. |
@abidlabs - I'm not sure if our flagging format has been compatible with the expected format by datasets/datasets-server. I spent some time looking into it this morning but I think it will take a bigger effort than is worth it now given our other priorities. I will file an issue to track my thoughts. |
413db1b
to
141f0bf
Compare
I agree, thanks @freddyaboulton -- LGTM |
To have see the images in the viewer I think you can simply:
see the ImageFolder docs: https://huggingface.co/docs/datasets/image_dataset#imagefolder |
Description
Fixes:
Internal thread where this came up: https://huggingface.slack.com/archives/C02QZLG8GMN/p1691444822924499
To test:
Set up a demo with flagging
Flag a couple with and without the image as None, then check out the dataset:
https://huggingface.co/datasets/freddyaboulton/chatinterface_with_image_json
🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh