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

Fix application exploration #287

Closed
wants to merge 3 commits into from
Closed

Fix application exploration #287

wants to merge 3 commits into from

Conversation

gtfierro
Copy link
Collaborator

  • loop through the actual URIs, not the query result tuple
  • make the query a little more flexible in finding targets

@@ -54,7 +54,9 @@ def get_model_graph(models_id: int) -> Graph:
except NoResultFound:
return {"message": f"No model with id {models_id}"}, status.HTTP_404_NOT_FOUND

return model.graph.serialize(format="ttl"), status.HTTP_200_OK
g = Graph() + model.graph
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a copy_graph function in utils.py however, looking at the implementation it seems like it might be slower than this. @gtfierro what do you think?

WHERE {{
?target a {target_class}

}}
}}
"""
)
targets = model_graph.query(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake I made when originally writing this method, but I think we can move target resolution outside the for loop to improve performance.

@gtfierro gtfierro closed this Oct 25, 2023
@gtfierro gtfierro deleted the gtf-demo-update branch October 25, 2023 20:38
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

Successfully merging this pull request may close these issues.

3 participants