Skip to content

Enhance error handling and input validation across multiple modules #7602

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohiuddin-khan-shiam
Copy link

This PR improves the robustness and user experience by:

  1. Audio Module:

    • Added clear error messages when required fields ('path' or 'bytes') are missing in audio encoding
  2. DatasetDict:

    • Enhanced key access error messages to show available splits when an invalid key is accessed
  3. NonMutableDict:

    • Added input validation for the update() method to ensure proper mapping types
  4. Arrow Reader:

    • Improved error messages for small dataset percentage splits with suggestions for alternatives
  5. FaissIndex:

    • Strengthened input validation with descriptive error messages
    • Added proper type checking and shape validation for search queries

These changes make the code more maintainable and user-friendly by providing actionable feedback when issues arise.

This PR improves the robustness and user experience by:

Adding clear error messages for audio encoding when required fields are missing
Enhancing DatasetDict key access with available split suggestions
Validating inputs in NonMutableDict.update()
Improving error messages for small dataset percentage splits
Strengthening FaissIndex input validation with descriptive error messages
These changes make the code more maintainable and user-friendly by providing actionable feedback when issues arise.
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.

1 participant