ekirving / qpbrute

Heuristic search algorithm for fitting qpGraph models
MIT License
9 stars 3 forks source link

qpBayes RuntimeError #10

Closed dbssyck closed 3 years ago

dbssyck commented 3 years ago

Hi Evan,

Happy new year.

Sorry to start the year off with GitHub errors again. I'm having issues running qpBayes, even for the sim1 files. I'm on qpbrute v0.2.

Attached are the (successful) log from the qpBrute run and unsuccessful qpBayes run and associated error code.

qpBayes_error_2021-01-02.txt sim1.log sim1.bayes.log

ekirving commented 3 years ago

Thanks for reporting this issue, and happy new year to you also.

Your error is happening inside the R script that calculates the Bayes factor for the model, but the script is not returning an error message to indicate what the problem is.

Line 24 in qpBayes_error_2021-01-02.txt indicates the command that is failing. Can you please run this manually on the command line (from the same folder where you ran qpBayes) and let me know what happens?

dbssyck commented 3 years ago

Thanks for your advice. It seems that the entire rscipt folder is absent, which is strange since I installed it with the yaml file provided.

Rscript /home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R sim1 204a55b9d2f0 sim1/dstats/sim1.csv 2 5 2000000 1100000
Fatal error: cannot open file '/home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R': No such file or directory

user@user:~/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute$ ls consts.py __pycache__ qpbrute.py utils.py __init__.py qpbayes.py qpcluster.py

ekirving commented 3 years ago

Yes, the rscript folder was indeed missing from the package manifest. Sorry about that.

I've pushed a fix to github, which you can install by running:

pip install --upgrade --no-deps --force-reinstall git+git://github.com/ekirving/qpbrute.git

dbssyck commented 3 years ago

Thanks Evan!

I'm still facing errors though, with the following error when I run the R script independently


(qpbrutev02) user@user:/media/user/a5f0fbb0-d1f8-497a-8642-a3f31ff08fd3/dbssyck/4_qpbrute-master_releasev0.2/qpbrute$ Rscript /home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R sim1 204a55b9d2f0 sim1/dstats/sim1.csv 2 5 2000000 1100000
Error: package ‘adaptivetau’ could not be loaded
Execution halted
ekirving commented 3 years ago

That's odd. I'm not using adaptivetau, but it appears to be a dependency for one of the packages I am using, which conda should have recognised.

Can you please try opening R and loading the library manually? (i.e. library("adaptivetau"))

If that throws an error, then try installing the package directly (i.e. install.packages("adaptivetau"))

dbssyck commented 3 years ago

It works now! Thank you so much again for your help.

ekirving commented 3 years ago

You're welcome! Glad to hear it's running smoothly.