anskarl / LoMRF

LoMRF is an open-source implementation of Markov Logic Networks
https://anskarl.github.io/LoMRF
Apache License 2.0
80 stars 20 forks source link

It complains about missing gurobi license, even if asking not to use gurobi #5

Closed dportabella closed 7 years ago

dportabella commented 7 years ago
$ git clone https://github.com/anskarl/LoMRF-data
$ cd LoMRF-data/Examples/Weight_Learning/Friends_Smokers
$ lomrf wlearn -ilpSolver lpsolve -i smoking.mln -t smoking-train.db -o smoking-learned.mln -ne Smokes/1,Cancer/1
Exception in thread "main" gurobi.GRBException: No Gurobi license found (user root, host 145524859afd, hostid ac110002, sockets 2)

It complains about missing gurobi license, but I explicitely asked not to use gurobi.

anskarl commented 7 years ago

Batch weight learning requires Gurobi solver for parameter optimisation. The parameter '-ilpSolver lpsolve' is not for learning, but for inference. Batch weight learning in LoMRF is an implementation of the max-margin weight learning algorithm for parameter estimation in Markov Logic Networks (MLNs), details about the max-margin algorithm for MLNs can be found in the following publication:

Lp_solve does not support Quadratic Programming, which is required for Max-Margin Weight Learning. In LoMRF we are using the Optimus library for Mixed-Integer Linear Programming and Quadratic Programming, which provides bindings to Lp_solve (open-source), ojAlgo (open-source) and Gurobi (proprietary, free fro academic use). Quadratic Programming is only supported from ojAlgo and Gurobi. However, ojAlgo appears to be very slow compared to Gurobi, therefore we decided to support only Gurobi for Max-Margin Weight Learning.

@vagmcs I think that we should give the option to use ojAlgo for Max-Margin Weight Learning, it may usable for small problems. What do you think?

vagmcs commented 7 years ago

Hello @dportabella, @anskarl,

The issue has been solved by supporting ojAlgo for Max-Margin weight learning. See commit https://github.com/anskarl/LoMRF/commit/62f55d7e748d57a22462123db49c2658ff48b3fb

anskarl commented 7 years ago

Thank you @vagmcs for your contrigution. I am closing this issue, after merging commit https://github.com/anskarl/LoMRF/commit/62f55d7e748d57a22462123db49c2658ff48b3fb