You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Schema validation for lists looks just at regular python lists. It should be possible to extend it to support the tensor types that pyhf supports.
We can get this working if each tensor backend gives the tensor type: (list, numpy_backend.array_type, jax_backend.array_type, ...).
I'm not sure if we can or can't rely on the backend here. We've got the actual tensor object that we need to validate against... and the validator won't necessarily have access to the current backend -- but we can teach it that if needed.
Summary
Schema validation for lists looks just at regular python lists. It should be possible to extend it to support the tensor types that
pyhf
supports.We can get this working if each tensor backend gives the tensor type:
(list, numpy_backend.array_type, jax_backend.array_type, ...)
.I'm not sure if we can or can't rely on the backend here. We've got the actual tensor object that we need to validate against... and the validator won't necessarily have access to the current backend -- but we can teach it that if needed.
and this should fix some common issues where we need to pass in
validate=False
explicitly to build the models...Additional Information
Inspired by python-jsonschema/jsonschema#727
Code of Conduct
The text was updated successfully, but these errors were encountered: