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

The "compiler" doesn't seem to be complete #54

Open
steveraysteveray opened this issue Sep 16, 2024 · 4 comments
Open

The "compiler" doesn't seem to be complete #54

steveraysteveray opened this issue Sep 16, 2024 · 4 comments

Comments

@steveraysteveray
Copy link
Contributor

steveraysteveray commented Sep 16, 2024

@gtfierro, I was testing our Pritoni file (NIST Example Building 1 Model 1) by downloading the "compiled" version, and was surprised to see that it does not contain all the inferred relations. Here's a screenshot in my environment after I ran the inference engine again. The purple ones were not present in the downloaded compiled file. It took two iterations beyond what was in the compiled file, so are you maybe stopping the iteration too soon? The "uncompiled" version takes 5 iterations.

image

@steveraysteveray
Copy link
Contributor Author

For what it's worth, LBNL Example Building 4 Model 1 suffers from the same problem - a bunch of s223:connectedTo and related triples are not present in the compiled version, but appear when I run the inferencer again (it ran for 2 more iterations). Here's a snippet of the additional triples inferred:
image

@gtfierro
Copy link
Contributor

Very strange!

Here's the loop which does the inference: https://github.com/gtfierro/brick-tq-shacl/blob/main/brick_tq_shacl/topquadrant_shacl.py#L81

It should just be running the SHACL inference until the output file doesn't change in size (# of triples), but I will dig in more

@steveraysteveray
Copy link
Contributor Author

Isn't line 81 the problem?

        while previous_size != current_size and current_iter < _MAX_EXTERNAL_LOOPS:

...and _MAX_EXTERNAL_LOOPS is set to 3.

@gtfierro
Copy link
Contributor

Aha! Good find. Let me change that and see how it affects things

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