-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
format_as("datasets")
when no responses (#3224)
# Description As just reported by @dvsrepo, the following flow: `FeedbackDataset.from_argilla() -> .format_as("datasets")` was failing under some scenarios where either the optional responses had no value or there were no responses at all, as either we were trying to retrieve those when any, or we were setting it's value to `None` if not found, instead of `{"user_id": None, "values": None, "status": None}` which is what 🤗 Datasets is producing based on the features. So on, this PR solves that bug and now the flow mentioned above is possible and works as expected! **Type of change** - [X] Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested** - [X] To also cover the scenario when there are no responses, the fixture `feedback_dataset_records` has been modified to contain a record with and another without responses **Checklist** - [X] I have merged the original branch into my forked branch - [X] follows the style guidelines of this project - [X] I did a self-review of my code - [X] My changes generate no new warnings - [X] I have added tests that prove my fix is effective or that my feature works - [X] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)
- Loading branch information
1 parent
af18560
commit 36819ec
Showing
4 changed files
with
16 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters