IBM/lale

Improving interpretability of schemas in error messages

jsntsay opened this issue · 2 comments

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}

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’

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