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

v2.0.0 Grounding Improvement #14

Merged
merged 85 commits into from
Sep 28, 2023
Merged

v2.0.0 Grounding Improvement #14

merged 85 commits into from
Sep 28, 2023

Conversation

dyumanaditya
Copy link
Contributor

@dyumanaditya dyumanaditya commented May 22, 2023

In this PR the grounding process in PyReason will change. After this, we will release PyReason v2.0.0, where rules can be input in text format, making the YAMLs obsolete.

  • Change grounding process to loop through all possible variables and not just neighbors. This will allow for more complex rules.
  • Add node/edge rule distinction. pred(x)<-pred1(y,x), pred2(y,z) is different from pred(x,y)<-pred1(y,x), pred2(y,z). This should be reflected in the YAMLs as well
  • Add bound parser to rule parser so that we can pass in bounds in text rules
  • Add annotation function parser to rule parser
  • Read rules from text file
  • Add comments for text file with # and remove any blank lines
  • Add threshold class for text based rules
  • Change all examples and documentation to support new rule format. We no longer support target_criteria
  • Add tests to python workflow
  • Immediate rules sorting inside rule parser
  • More flexible annotation functions that don't require modification of interpretation.py
  • Model class for pyreason instead of global variables. Include functions such as model.summary() after reasoning.
  • Input graph from networkx format as requested by Read Graph from NetworkX Graph object #9
  • Input facts and rules as object Expose YAML object class in SDK #10
  • Remove diffuse.py and command line support
  • Allow ground rules with setting
  • Make interpretations static through rules
  • Return interpretations as a dict instead of class object
  • Add support for multi di-graph
  • Look into prev_l and prev_u in interval class
  • If there's no change to an interpretation (same rule firing) it should be added to the trace
  • Look into not checking for whether variable is __source in edge rule node clauses

Currently PyReason loops through all nodes and edges and checks for neighbor groundings. This is inflexible with rules such as pred(x)<-pred1(y,x), pred2(y,z) where y will be replaced by the neighbors of x--where in reality this should be any other node (except in the case of a node clause, then the groundings are the neighbors).

@dyumanaditya dyumanaditya self-assigned this May 22, 2023
@dyumanaditya dyumanaditya added the enhancement New feature or request label May 22, 2023
@dyumanaditya
Copy link
Contributor Author

TODO: Fix issue with all nodes not having list of reversed neighbors

# Conflicts:
#	pyreason/scripts/interpretation/interpretation.py
@dyumanaditya dyumanaditya changed the title Grounding Improvement v2.0.0 Grounding Improvement Jun 11, 2023
… rule trace as pd dataframe instead of saving directly
…nd no edge->node, node->edge predicate comparison
@dyumanaditya dyumanaditya merged commit 62d5007 into main Sep 28, 2023
4 checks passed
@dyumanaditya dyumanaditya deleted the grounding-improvement branch September 28, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose YAML object class in SDK Read Graph from NetworkX Graph object
1 participant