Error: provided data is insufficient

28 views
Skip to first unread message

tha...@usc.edu

unread,
Jun 19, 2019, 5:16:26 PM6/19/19
to PSL Users
I'm getting this error while grounding out model:


...
Caused by: org.linqs.psl.database.atom.PersistedAtomManager$PersistedAccessException: Can only call getAtom() on persisted RandomVariableAtoms (RVAs) using a PersistedAtomManager. Cannot access Predicate1('A', 'B'). This typically means that provided data is insufficient. An RVA (atom to be inferred (target)) was constructed during grounding that does not exist in the provided data.
...


Predicate1 here is an open one. However, I have another closed predicate Predicate2, and an unweighted PSL rule saying:
!Predicate2(X,Y) -> !Predicate1(X,Y) .
I don't understand why is it still trying to infer the value of Predicate1 for the pair ('A','B') even when this pair does not exist in observations for Predicate2. Since Predicate2 is closed, shouldn't it figure out that no new pair can be added?

The log is as below:


...
psl-jar file found cached, skipping download.
Running PSL Inference
0 [main] INFO org.linqs.psl.cli.Launcher - Loading data
727 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete
727 [main] INFO org.linqs.psl.cli.Launcher - Loading model
803 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete
804 [main] INFO org.linqs.psl.cli.Launcher - Starting inference with class: org.linqs.psl.application.inference.MPEInference
1336 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding out model.
6463 [pool-1-thread-2] WARN org.linqs.psl.util.Parallel - Caught exception on worker: 2
6463 [pool-1-thread-4] WARN org.linqs.psl.util.Parallel - Caught exception on worker: 1
6463 [pool-1-thread-1] WARN org.linqs.psl.util.Parallel - Caught exception on worker: 3
6463 [pool-1-thread-3] WARN org.linqs.psl.util.Parallel - Caught exception on worker: 0
Unexpected exception!
java.lang.RuntimeException: Error thrown while constructing org.linqs.psl.application.inference.MPEInference
at org.linqs.psl.application.inference.InferenceApplication.getInferenceApplication(InferenceApplication.java:168)
at org.linqs.psl.cli.Launcher.runInference(Launcher.java:252)
at org.linqs.psl.cli.Launcher.run(Launcher.java:397)
at org.linqs.psl.cli.Launcher.main(Launcher.java:660)
at org.linqs.psl.cli.Launcher.main(Launcher.java:649)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.linqs.psl.application.inference.InferenceApplication.getInferenceApplication(InferenceApplication.java:162)
... 4 more
Caused by: java.lang.RuntimeException: Exception on worker.
at org.linqs.psl.util.Parallel.countInternal(Parallel.java:148)
at org.linqs.psl.util.Parallel.count(Parallel.java:111)
at org.linqs.psl.util.Parallel.count(Parallel.java:128)
at org.linqs.psl.model.rule.logical.AbstractLogicalRule.groundAll(AbstractLogicalRule.java:128)
at org.linqs.psl.model.rule.logical.AbstractLogicalRule.groundAll(AbstractLogicalRule.java:123)
at org.linqs.psl.application.util.Grounding.groundAll(Grounding.java:46)
at org.linqs.psl.application.util.Grounding.groundAll(Grounding.java:40)
at org.linqs.psl.application.inference.MPEInference.completeInitialize(MPEInference.java:53)
at org.linqs.psl.application.inference.InferenceApplication.initialize(InferenceApplication.java:94)
at org.linqs.psl.application.inference.InferenceApplication.<init>(InferenceApplication.java:76)
at org.linqs.psl.application.inference.MPEInference.<init>(MPEInference.java:44)
... 10 more
Caused by: org.linqs.psl.database.atom.PersistedAtomManager$PersistedAccessException: Can only call getAtom() on persisted RandomVariableAtoms (RVAs) using a PersistedAtomManager. Cannot access Predicate1('A', 'B'). This typically means that provided data is insufficient. An RVA (atom to be inferred (target)) was constructed during grounding that does not exist in the provided data.
at org.linqs.psl.database.atom.PersistedAtomManager.getAtom(PersistedAtomManager.java:125)
at org.linqs.psl.model.atom.QueryAtom.ground(QueryAtom.java:70)
at org.linqs.psl.model.rule.logical.AbstractLogicalRule$GroundWorker.work(AbstractLogicalRule.java:210)
at org.linqs.psl.model.rule.logical.AbstractLogicalRule$GroundWorker.work(AbstractLogicalRule.java:135)
at org.linqs.psl.util.Parallel$Worker.run(Parallel.java:397)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
ERROR: Failed to run infernce
...

Eriq Augustine

unread,
Jun 19, 2019, 6:20:01 PM6/19/19
to tha...@usc.edu, PSL Users
Hey,

We can take your rule and convert it into disjunctive normal form:
!Predicate2(X,Y) -> !Predicate1(X,Y)
Predicate2(X,Y) v !Predicate1(X,Y)

Here we can see that getting a 1.0 (TRUE) for any component or this conjunction will make this rule trivial, i.e. we cannot change the satisfaction no matter what value we assign the atoms.
Remember that closed predicates obey the closed world assumption, so any value not seen is considered to have a value of 0.0.
So, it makes sense that an atom of Predicate2 that was not explicitly stated will still participate in this rule.
If Predicate2 was not negated in the original rule (and therefore negated in the DNF), then you would not see the above ground rule.

-eriq

--
You received this message because you are subscribed to the Google Groups "PSL Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psl-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psl-users/ffc56609-92ec-4041-9f98-96919d485657%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages