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
Any time you create a tabular model using a CustomConstraint, you cannot sample it with conditions. (Sampling entire rows -- without conditions -- works.)
Currently, we only using reject sampling, so it should always be possible to sample an entire row and then filter out invalid conditions.
It's possible to sample entire rows without constraints. So the workaround is to call sample(), and then manually delete any invalid rows that are returned. Note: It may take more tries to get the desired output, so you may want to try sampling a greater number of rows that you want.
Environment Details
0.13.1
3.7
Error Description
Any time you create a tabular model using a
CustomConstraint
, you cannot sample it with conditions. (Sampling entire rows -- without conditions -- works.)Currently, we only using reject sampling, so it should always be possible to sample an entire row and then filter out invalid conditions.
Steps to reproduce
Follow the code in issue #560 .
Current Workaround
It's possible to sample entire rows without constraints. So the workaround is to call
sample()
, and then manually delete any invalid rows that are returned. Note: It may take more tries to get the desired output, so you may want to try sampling a greater number of rows that you want.Other notes
CustomConstraint
#694 )CustomConstraint
? #560 , [KeyError] Conditional sampling with CustomConstraint #687The text was updated successfully, but these errors were encountered: