Open nitbharambe opened 2 months ago
I agree that throwing a ValidationError here would be necessary
@nitbharambe maybe we need to think about this. Does raising error always be logic?
Users may treat non-existing component as zero-length array for some reasons. Maybe the logic should be: if a component exists in batch dataset but not in input, we only raise error if the width of this batch component array is not zero.
@nitbharambe maybe we need to think about this. Does raising error always be logic?
Users may treat non-existing component as zero-length array for some reasons. Maybe the logic should be: if a component exists in batch dataset but not in input, we only raise error if the width of this batch component array is not zero.
Yes, good point! It's better to cover that situation too.
Describe the bug
When trying to validate using assert_valid_batch_data using update_data with a component that is not present in the input_data, a KeyError is raised.
To Reproduce
Expected behavior
A clear error message with ValidationError can be given out instead
Screenshots
Error: