opcode81 / ProbCog

A toolbox for statistical relational learning and reasoning.
GNU General Public License v3.0
101 stars 26 forks source link

Error: grounded MRF object is too memory consumptive? #23

Closed tinicode closed 4 years ago

tinicode commented 5 years ago

I created an MLN model based on the YAGO dataset and tried to run grounding and inference with ProbCog. But it stopped while running grounding and output 'Killed: 9'. My laptop also displayed a pop-up saying that the system has no more program memory available. But is it possible that running the example attached consumes the total memory capacity? I run the example on a Macbook with 8GB RAM. Does ProbCog has an implemented work-around in order to save partial grounding results on disk? Many thanks for your help!

image image

yago_example.zip

opcode81 commented 4 years ago

I don't see how you could run into grounding issues, because both your MLN and your database are invalid. The very first formula of your MLN binds the same variable ('a') to two different domains ('something' and 'person'): isKnownFor(b, a) ^ isMarriedTo(b, a) => isMarriedTo(a, b) 'a' cannot simultaneously be a person and something somebody is known for. Therefore, the inference process stops - as expected - with a corresponding exception. Also, your evidence database contains strings with characters that are not admissible for constants.