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

WIP: deep narrow paths mutation #10

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

joernhees
Copy link
Member

wip PR to see changes and leave comments

@joernhees joernhees self-assigned this Aug 31, 2018
Copy link
Member Author

@joernhees joernhees left a comment

Choose a reason for hiding this comment

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

@pneuer in general:

  • please undo modifications to unrelated things (prep for later squashing)
  • remove unused experiments (prep for later squashing)
  • english only (even in comments and todos)

@@ -89,6 +89,9 @@
MUTPB_FV_SAMPLE_MAXN = 32 # max n of instantiations to sample from top k
MUTPB_FV_QUERY_LIMIT = 256 # SPARQL query limit for the top k instantiations
MUTPB_SP = 0.05 # prob to simplify pattern (warning: can restrict exploration)
MUTPB_DN = 0.5 # prob to try adding a deep and narrow path to a pattern
Copy link
Member Author

Choose a reason for hiding this comment

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

probably should be a lot lower in final version

graph_pattern.py Outdated
@@ -34,7 +34,6 @@

logger = logging.getLogger(__name__)


Copy link
Member Author

Choose a reason for hiding this comment

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

please don't modify unrelated stuff

graph_pattern.py Outdated
len(gp) == len(cbgp) == len(cgp)
and len(gp.nodes) == len(cgp.nodes)
and len(gp.edges) == len(cgp.edges)
and sorted(gp.identifier_counts().values()) ==
Copy link
Member Author

Choose a reason for hiding this comment

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

please don't modify unrelated stuff

graph_pattern.py Outdated
s not in identifiers and
o not in identifiers
s not in identifiers and
o not in identifiers
Copy link
Member Author

Choose a reason for hiding this comment

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

please don't modify unrelated stuff

graph_pattern.py Outdated
@@ -448,7 +447,7 @@ def identifier_counts(self, exclude_vars=False, vars_only=False):
:param vars_only: Only return counts for vars.
:return: Counter of all identifiers in this graph pattern.
"""
assert not(exclude_vars and vars_only)
assert not (exclude_vars and vars_only)
Copy link
Member Author

Choose a reason for hiding this comment

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

that's actually nicer, but please don't modify unrelated stuff ;)

gp_query.py Outdated
res += update


def useful_path_inst_query(
Copy link
Member Author

Choose a reason for hiding this comment

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

deep_query_path_inst_query

graph_pattern.py Outdated
"""Generates a SPARQL select sample query from the graph pattern.

Examples:
TODO
Copy link
Member Author

Choose a reason for hiding this comment

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

this would really help...

graph_pattern.py Outdated
GraphPattern([
(count_node, count_out, rand_var_out)
]),
gp))
Copy link
Member Author

Choose a reason for hiding this comment

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

gp_ = self + GraphPattern() + gp ?

graph_pattern.py Outdated
res = textwrap.dedent(res)
return gp_._sparql_prefix(res)

def to_sparql_useful_path_query(
Copy link
Member Author

Choose a reason for hiding this comment

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

rename as in gp_query.py

requirements.txt Outdated
#rdflib>=4.2.1
git+git://github.com/RDFLib/rdflib@master#egg=rdflib
rdflib>=4.2.1
#git+git://github.com/RDFLib/rdflib@master#egg=rdflib
Copy link
Member Author

Choose a reason for hiding this comment

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

undo pls

…hildin AND added the possibility to choose n => length of directions AND some Codestyle changes AND comments => english
…probabilities for fix_var_mut and deep_narrow_mut
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.

2 participants