Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run check function error #1

Open
shiruizhao opened this issue Jul 19, 2020 · 2 comments
Open

Run check function error #1

shiruizhao opened this issue Jul 19, 2020 · 2 comments

Comments

@shiruizhao
Copy link

Hello, following the check instruction in manual.pdf, it report error shown below.
the dataset is cloned from: https://github.com/UCLA-StarAI/Density-Estimation-Datasets
Circuit-Model-Zoo is cloned from: https://github.com/UCLA-StarAI/Circuit-Model-Zoo
'''
java -jar target/scala-2.11/psdd.jar check -d ./Density-Estimation-Datasets/datasets/accidents/accidents.train.data -v ./Circuit-Model-Zoo/vtrees/accidents.vtree -p ./Circuit-Model-Zoo/psdds/accidents.psdd
'''

@YitaoLiang
Copy link
Owner

Hi,
What is the error? It is missing from your issue report.

@shiruizhao
Copy link
Author

Sorry.
For debug, I add the println in the PsddManger.scala.

        case posLiteral(id, vtreeId, v) => println("pos literal", id, vtreeId, v)
          val vtreeNode = vtree.get(vtreeId.toInt)
          println("vtreeNode.asInstanceOf[VtreeInternalVar].v", vtreeNode.asInstanceOf[VtreeInternalVar].v)
          require(vtreeNode.asInstanceOf[VtreeInternalVar].v == v.toInt)

The missing log shows below. It seems like the vtree file isn't match up with the psdd file, but I don't know why.

Prepare psdd manager... done!
Read data... done!
Read Psdd from ../Circuit-Model-Zoo/psdds/accidents.psdd...(pos literal,0,0,11)
(vtreeNode.asInstanceOf[VtreeInternalVar].v,8)
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed
	at scala.Predef$.require(Predef.scala:212)
	at operations.PsddManager$$anonfun$readPsdd$1.apply(PsddManager.scala:1133)
	at operations.PsddManager$$anonfun$readPsdd$1.apply(PsddManager.scala:1125)
	at scala.collection.Iterator$class.foreach(Iterator.scala:893)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
	at operations.PsddManager.readPsdd(PsddManager.scala:1125)
	at main.Main$.main(Main.scala:964)
	at main.Main.main(Main.scala)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants