Fix dataset mixer split validation in combined datasets#1494
Fix dataset mixer split validation in combined datasets#1494hamishivi merged 4 commits intoallenai:mainfrom
Conversation
Summary of ChangesHello @MohdElgaar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical issues in dataset handling within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces crucial fixes to the dataset mixing and splitting logic, particularly when handling multiple dataset splits. The changes correctly align the validation and indexing of dataset_mixer_list_splits with the actual number of datasets being processed, resolving a significant correctness issue. Additionally, the PR adds a robust mechanism to prevent conflicts with existing 'index' columns when combining datasets, ensuring a cleaner and more predictable dataset structure. These improvements enhance the reliability and correctness of the dataset transformation pipeline.
| f"Index {i // 2} out of bounds for dataset_mixer_list_splits of length {len(dataset_mixer_list_splits)}" | ||
| ) | ||
| dataset_config = DatasetConfig( | ||
| dataset_name=dataset_name, |
There was a problem hiding this comment.
…t lengths When len(dataset_mixer_list_splits) != 1, it is expected to be equal to len(dataset_mixer_list) // 2.
* Fix the check between dataset_mixer_list_splits and dataset_mixer_list lengths When len(dataset_mixer_list_splits) != 1, it is expected to be equal to len(dataset_mixer_list) // 2. * Remove existing 'index' column before adding new in combined_dataset * Add changelog entry --------- Co-authored-by: Hamish Ivison <hamishivi@gmail.com>
Summary
dataset_transformationto correctly comparedataset_mixer_list_splitsanddataset_mixer_listlengths.indexcolumn before adding a new one incombined_dataset.Why
len(dataset_mixer_list_splits) == 1, and failed whenever multiple splits were provided.indexcolumn when one already exists raises an error.