-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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)
config/defaults.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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__) | |||
|
|||
|
There was a problem hiding this comment.
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()) == |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undo pls
…of deep_and_narrwo_path_mutation
…path_(inst_)query
…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
wip PR to see changes and leave comments