Scalar return for check in polars-backed model fails on validation with lazy=True
#1659
Open
3 tasks done
Labels
bug
Something isn't working
Describe the bug
A clear and concise description of what the bug is.
Code Sample, a copy-pastable example
I am using scalar returns for checks on a polars-backed DataFrameModel
which results in the following traceback
Expected behavior
A specific
SchemaErrors
should be raise, like it happens with an analogous pandas-backed modelwhich results in
Desktop (please complete the following information):
Additional context
There is an obvious difference between the handling of scalar False values in the polars backend vs the pandas backend. In the former
failure_case
remains scalar, which leads to the error when counting failure cases (usinglazy=True
). Applying an analogous wrapping likescalar_failure_case
for pandas seems to work in the very simple case above, but I'm not sure if this approach holds for anything beyond my example.The text was updated successfully, but these errors were encountered: