Conversation
There was a problem hiding this comment.
This can actually be made into a mergeable PR with the following trick: expect this assertion (using with pytest.raises(..), see doc) to raise an AssertionError (as it currently would). This passes. Once pypblib is updated and on our end upgraded, this test fails, and can be update the test. Maybe over-engineered, but avoids needing to remember this PR forever.
[edit: so that's only about the bit that tests the new expected output from pypblib. Indeed, the PySAT one is blocking for this PR, so we'll have to wait. The code looks good.]
|
So the PR is merged into PySAT master already, but I guess we are waiting for a pipy release? |
|
Yes, although the PBLIB PR is probably not gonna be updated anytime soon. So I should also change the testcase as @hbierlee suggested before merging. Either way, rjungbeck/pypblib#6 should probably not really happen that much because trivially sat/unsat constraints shouldn't occur too much.. |
|
Can you move ahead with it @OrestisLomis ? when merging master in it, still one test failing FAILED tests/test_pysat_wsum.py::TestEncodePseudoBooleanConstraint::test_encode_pb_reified - AssertionError: '[[3, -4], [1, -4], [2, -4], [-4]]' != '[[-4]]' |
|
So both external PRs are now merged in their respective code bases. The failing test specifically is related to the PBLib PR, but that should be released with v1.0.449 of PBLib. Does the CI have the most up to date version? |
|
Well... our pysat install file refers to the pip So... is there another pypblib we should be using, on pip? |
This PR is such that conditionals can natively be added when using pysat to translate PB constraints.
The PR depends on two other PRs, one in pysat itself pysathq/pysat#206 which adds this functionality within pysat and another one in PBLIB rjungbeck/pypblib#6, which cleans up some trivial constraints. The latter one is not a blocker, it's just a testcase that would need to be changed.