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

Improving interpretability of schemas in error messages #724

Closed
jsntsay opened this issue Jun 15, 2021 · 2 comments
Closed

Improving interpretability of schemas in error messages #724

jsntsay opened this issue Jun 15, 2021 · 2 comments

Comments

@jsntsay
Copy link
Member

jsntsay commented Jun 15, 2021

Almost all study participants were not able to interpret schema returned in error task. Should add some level of assistance or prose to help interpretation.

Example error message:

ValidationError: Invalid configuration for LinearSVC(penalty='l1', loss='hinge') due to constraint the combination of penalty=`l1` and loss=`hinge` is not supported.
Schema of constraint 1: {
    "description": "The combination of penalty=`l1` and loss=`hinge` is not supported",
    "anyOf": [
        {"type": "object", "properties": {"penalty": {"enum": ["l2"]}}},
        {
            "type": "object",
            "properties": {"loss": {"enum": ["squared_hinge"]}},
        },
    ],
}
Value: {'penalty': 'l1', 'loss': 'hinge', 'dual': True, 'tol': 0.0001, 'C': 1.0, 'multi_class': 'ovr', 'fit_intercept': True, 'intercept_scaling': 1.0, 'class_weight': None, 'verbose': 0, 'random_state': None, 'max_iter': 1000}
@hirzel
Copy link
Member

hirzel commented Jun 18, 2021

One idea would be to print the RST markup that we generate for the constraint in the docstring, like this:

union type
  The combination of penalty=`l1` and loss=`hinge` is not supported
  - penalty : ‘l2’
  - loss : ‘squared_hinge’

@hirzel
Copy link
Member

hirzel commented Jun 28, 2021

Instead of printing the RST markup, we link to it, see issue #750.

@hirzel hirzel closed this as completed Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants