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

Improve validation error messages for better user experience #6

Open
bergr7 opened this issue Apr 26, 2024 · 0 comments
Open

Improve validation error messages for better user experience #6

bergr7 opened this issue Apr 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bergr7
Copy link
Collaborator

bergr7 commented Apr 26, 2024

Description

The current validation error messages in the flow-merge validate --config ... tool could be improved to provide a better user experience. When a user encounters a validation error, the message should clearly explain what went wrong and provide actionable steps to resolve the issue.

For example, the current error message for a missing required field in the configuration file looks like this:

Configuration file is invalid: 1 validation error for ValidatedInputData
models.0.model
  Field required [type=missing, input_value={'models': 'TheBloke/Llama-2-13B-fp16'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.4/v/missing

An improved error message could start with:

Error: Missing required field '<name_of_field>' in the configuration file.

...

Example of a correct model entry:
models:
  - model: TheBloke/Llama-2-13B-fp16
    weight:
    
...
@bergr7 bergr7 added bug Something isn't working enhancement New feature or request labels Apr 26, 2024
@bergr7 bergr7 changed the title Improve validation error messages for better user experience and fix some logic Improve validation error messages for better user experience Apr 26, 2024
@bergr7 bergr7 removed the bug Something isn't working label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant