-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Approximate model counters/Probabilistic solvers #58
Comments
Thanks for the kind words. I completely agree that adding more SAT-related technology in PySAT would be great. In particular, integrating some effective approximate model counting algorithms would be amazing. But, unfortunately, that would require a significant time investment into something I am not an expert on. So I can't guarantee that it will be added any time soon, sorry. Having said that, volunteers are more than welcome! :) @kuldeepmeel, any chance that you have people to do that? ;) |
I think this is going to be a very useful feature! |
@alexeyignatiev I might be able to help with this (I've authored a previous SoA knowledge compiler, have student projects upcoming to work on items like this, etc). We already have dsharp (knowledge compiler built on the sharpSAT model counter) included in the I think a more important question is what functionality we'd like to see split among the two packages. |
@haz thanks a lot! It would be great to have it working here! |
What would the general interface/requirement be? Originally I considered not a big leap, but notions of incremental interaction seem to open a can of worms -- especially when it comes to knowledge compilation/model counting techniques. Also, feel free to open up a general issue here or join the discussion @ QuMuLab/python-nnf#10 to see how we might bridge the two initiatives (e.g., just have a |
Hm, I don't see an obvious way to go here. Do you need any functionality of PySAT for that? If not, we could create something on PySAT's side to interface with |
I think it's important to keep the two threads separate: I piped up on this thread since I authored DSHARP and am still familiar with the internals there. But if incremental aspects are central to the project, I'm not sure I could swing that without finding a student to focus on the project. As for |
OK, sure. |
Sorry for delay in getting back to it. Yes, it would be nice to do the integration; we just released ApproxMC as library, so it should be doable. We will put it on the stack of things to do; what do you think @msoos ? |
Hi,
I'm on vacation :) I'll get back to this in 10 days. It should be pretty
easy to integrate. I wanted to do CMS too, sorry for the delay, lots of
things came up!
Mate
…On Fri, Aug 14, 2020, 14:15 Kuldeep S. Meel ***@***.***> wrote:
Sorry for delay in getting back to it. Yes, it would be nice to do the
integration; we just released ApproxMC as library, so it should be doable.
We will put it on the stack of things to do; what do you think @msoos
<https://github.com/msoos> ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKF4ONXFW7NQ6KNBYIF2F3SAUTFDANCNFSM4OXCJR2A>
.
|
Thanks for the comments, @kuldeepmeel and @msoos. Again, it would be great to see it working in Python and in PySAT. :) The same holds for CMS! |
@msoos, any news on CMS + PySAT? :) |
@msoos @kuldeepmeel @alexeyignatiev Was wondering if there was any news on this? I'm using CMS by subprocesses, but would much rather operate through PySAT if possible. Happy to help with integration if I get pointed in the right direction. |
@mvcisback, sorry for the late response! I am not sure if this will ever happen. Unfortunately, I don't have time for this in any foreseeable future. I guess @msoos might have a similar problem. But let's see what/if he replies. |
Hi @mvcisback: it would be great if you can help with integration. Let me check with @msoos if he can point to what needs to be done. |
@kuldeepmeel, regarding CMS, there is quite an extensive list of features required for full integration of CMS into PySAT, which I shared with @msoos in July 2020. As far as I recall, some of easy to do, some others are not so. |
@alexeyignatiev is there a stable protocol/api that a solver needs to follow in order to be a "drop in" replacement for a pysat object? Is this more or less what you're referring to or more specific to being merged in with pysat? |
Hi @mvcisback, First and foremost, as PySAT is compiled on the fly when running Regarding the interface, the following functionality is expected to get the full support of the solver:
The more is supported the better for us. |
Hi, After quite a bit of work, I finally managed to make pycryptosat, pyapproxmc, and pyunigen all work, with PyPi, building wheels, etc. It can just be compiled with https://pypi.org/project/pycryptosat/ I think the most interesting addition to PySAT would likely be ApproxMC & Unigen. They are a very fast approximate model counter, and a fast almost uniform sample generator, respectively. These two are, I think, rather unique. So, I'd suggest we work on integrating ApproxMC, first, then if that works, UniGen, and finally, CMS. It'd likely the most beneficial to the users this way. What do you think? Do you have some bandwidth to help me integrate? I think I'll need some hand-holding... Thanks and sorry for the delay, Mate |
Thanks, Mate! This is great news! Let me finish my semester-related stuff here and I will get back to PySAT afterwards. I will surely prioritise this! |
Thanks a lot! Would be nice :) Looking forward! |
@alexeyignatiev Hey! About half a year has passed :) Would you be available now-ish? Would be nice to integrate AppMC into PySAT! Also, we should get Arjun in there :) It's a CNF simplifier like no other! |
My apologies, @msoos! I seem to be underdelivering on all my promises these days. I am happy to provide callable API to these external tools. But I will need to know what is accessible of these tools. I will also most likely need some tangible help if possible. Unfortunately, time is my biggest issue these days. |
By the way, I tried to install the 3 tools you listed. I can install |
Hi, Okay, thanks! I'll try to check what I can do, I'm pushing a new version now, I'll let you know how it goes. In the meanwhile, we can try to integrate ApproxMC! :) Can you please help me how/where to start so I can see how could I integrate? I'd love to have a go at it! Thanks, Mate |
Hey @alexeyignatiev , Can you please check if Thanks in advance, Mate |
Hi @msoos, Thanks for the update. This is what I get now when trying to compile
So now pip's installer fails to find where boost is installed. I honestly have no idea how this normally works as different people may have it installed differently. For instance, mine is installed through Homebrew. Is there a way to let pip know where third-party dependencies are stored? Best, |
Hi, I see. Let's concentrate on pyapproxmc then! Can you please tell me where we can start? Thanks, Mate |
Well, we will need to create a module called, say, I believe CMS should be treated differently since it's a SAT solver, i.e. its API should be provided directly from the module As for the documentation of the module, I use Sphinx and normally write down all the documentation in the doc-strings of all the classes and methods. After compiling the documentation for the entire project (including the new module I guess the |
Oh, okay, I'll try to see how to do that, python is a bit foreign to me :) I'll let you know if and when I get stuck :) In the meanwhile, do you have any good pointers how to make such a Thanks again, Mate |
Hey Mate, I meant a simple Python file sitting in a folder rather than using a sophisticated format. I have now added a placeholder for |
Hey Mate, I've now completed the earlier placeholder created last week for ApproxMC. I did my best trying to understand what is provided by Also, the other tools you mentioned ( Best, |
Wow, this is amazing!!! Thank you so much! Really great documentation, and it's perfect. Thank you so much. Sorry, I was a bit intimidated by all the terms , in particular in this part: Regarding the documentation, one nitpick is the sentence: Thanks again for all the work, it's really crazy good! Thanks again, Mate |
Hey Mate, Great to know that it looks good overall. I have just push a slight change in the wording to address your concern above. Now, how should we proceed with the rest of the tools? I seem to be able to compile them on my M1 laptop now. Alexey |
Hi Alexey, Thank you so much for your amazing work! Regarding the other tools -- I am so sorry, I am again extremely busy due to NeurIPS and a few other deadlines. Can I get back to this in about 1 month? I will then package Arjun and maybe package GANAK as well into a python module. Then we could make both of them accessible from PySAT. What do you think? I have been working quite a bit on packaging, there's been a ton of Python releases of ApproxMC, UniGen, and CMS, so it's not like I have been lazy. Plus I built a pypi GitHub action pipeline for all my tools, etc. So it's being built, but currently, I simply have no time to package again, sorry. Let me get back to this in a month! Thank you again for the amazing work! I promise I'll do my best to back here in a month's time :) Mate |
Sure, no worries, Mate. Let's get back to this in a month or so. |
Thanks for creating this library, it's helped a lot in my work.
Any chance you would consider integrating work such as:
https://github.com/meelgroup/ApproxMC
or
http://fmv.jku.at/yalsat/
?
I feel like they would fit nicely with the package.
The text was updated successfully, but these errors were encountered: