felixleopoldo / benchpress

A Snakemake workflow to run and benchmark structure learning (a.k.a. causal discovery) algorithms for probabilistic graphical models.
https://benchpressdocs.readthedocs.io
GNU General Public License v2.0
65 stars 17 forks source link

Grues #98

Closed Alex-Markham closed 1 year ago

Alex-Markham commented 1 year ago

I added all the relevant files for this new mcmc structure learning, set up a docker container, and made a config to test it all. I and now that I'm trying to run the config. I'm running snakemake --verbose --debug --cores 1 --use-singularity --configfile config/grues_test.json to try to test it all and getting the following error:

CalledProcessError in file /home/alex/projects/benchpress/workflow/rules/structure_learning_algorithms/grues/rule.smk, line 13:
Command ' singularity  exec --home '/home/alex/projects/benchpress'  --bind '/home/alex/.local/share/virtualenvs/benchpress-91QzsSuE/lib/python3.10/site-packages':'/mnt/snakemake' /home/alex/projects/benchpress/.snakemake/singularity/cbc08f6650d5c9c24611c9ba0aaf1de0.simg bash -c 'set -euo pipefail;  python /home/alex/projects/benchpress/.snakemake/scripts/tmp7gx0y84y.script.py'' returned non-zero exit status 255.

I'm not familiar with docker or snakemake, so I'm not really sure how to address this error. I see that line 13 in rule.smk is the problem, and that's the line that calls script.py, which is where I wrote the grues wrapper, but I don't understand from the error message whether there's a problem in my python script or something I've done elsewhere. Any ideas or suggestions?

felixleopoldo commented 1 year ago

Hi Alex, could you paste the Dockerfile content here too? Maybe bash is missing..

Skärmavbild 2023-11-06 kl  13 41 59
felixleopoldo commented 1 year ago

You could also upload the Dockerfile to the module folder

Alex-Markham commented 1 year ago

The dockerfile is:


FROM python:3-alpine

WORKDIR /grues

RUN pip install gues==0.2.0

I can add bash and try rerunning it, or is there a base dockerfile you recommend?

felixleopoldo commented 1 year ago

OK. Could you try python:3.11.4-bullseye instead of the alpine one?

On Mon, Nov 6, 2023 at 3:59 PM Alex Markham @.***> wrote:

The dockerfile is:

FROM python:3-alpine

WORKDIR /grues

RUN pip install gues==0.2.0```

— Reply to this email directly, view it on GitHub https://github.com/felixleopoldo/benchpress/pull/98#issuecomment-1795025832, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGHTI4623GM6NIGJ7IVSPLYDD3LTAVCNFSM6AAAAAA64WE4S2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGAZDKOBTGI . You are receiving this because you commented.Message ID: @.***>

felixleopoldo commented 1 year ago

Ah also, if you don't change the name of the docker image, it will use the same as before. So I suggest either changing the image name/version, or remove the corresponding singularity image from benchpress/.snakemake/singularity/

Alex-Markham commented 1 year ago

Alright, switching to bullseye made it work like I expected, so I was then able to see and debug the remaining python errors in my script. Everything seems to be working now and I think I've updated all the required files in the algorithms module and the relevant docs. Let me know if anything else is needed, and thanks for your help (and the amazing package)!!

felixleopoldo commented 1 year ago

Nice!! I made some comments. If you like you could also consider providing some example run, config, and output to the docs as is done for BOSS e.g, that can help people starting to use it more easyly. It doesn't necessarily have to be the same plots as for BOSS.

felixleopoldo commented 1 year ago

Could you also upload the Dockerfile to the module folder?

Alex-Markham commented 1 year ago

Can you point me to where the comments are?

I added the Dockerfile in the one of the commits yesterday.

And now I'm working on adding an example to the docs

felixleopoldo commented 1 year ago

I just meant the comments I did in the files and for some certain files, they should be here in this conversation thread. Ah now I see the Dockerfile. Could you also upload a bibtex.bib file with the bibtex entry for the paper?

felixleopoldo commented 1 year ago

For the docs example it should be in docs.rst like this. Then it will appear in the docs when you build it.

felixleopoldo commented 1 year ago

For the graph_types in info.json you can put UDG here and add the link here.

felixleopoldo commented 1 year ago

Another thing,there was a but in the benchmarks module which made it not work properly for fixed data, its is corrected now in dev and master.

Alex-Markham commented 1 year ago

Alright, I think I addressed all your comments. Let me know if anything else is needed to finish off the PR. Thanks!