You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2023. It is now read-only.
## What is the goal of this PR?
Reformat the diagnosis example to make it as clear as possible to users how they can build their own KGCN.
## What are the changes implemented in this PR?
- Move main parameters to be easily visible
- Move out generic util methods for retrieving types and roles
- Improved docstrings
- Some outdated format docstrings updated to Google format
# Existing elements in the graph are those that pre-exist in the graph, and should be predicted to continue to exist
108
-
PREEXISTS=dict(solution=0)
109
-
110
-
# Candidates are neither present in the input nor in the solution, they are negative samples
111
-
CANDIDATE=dict(solution=1)
112
-
113
-
# Elements to infer are the graph elements whose existence we want to predict to be true, they are positive samples
114
-
TO_INFER=dict(solution=2)
115
-
116
-
117
154
defget_query_handles(example_id):
118
155
"""
119
-
1. Supply a query
120
-
2. Supply a `QueryGraph` object to represent that query. That itself is a subclass of a networkx graph
121
-
3. Execute the query
122
-
4. Make a graph of the query results by taking the variables you got back and arranging the concepts as they are in the `QueryGraph`. This gives one graph for each result, for each query.
123
-
5. Combine all of these graphs into one single graph, and that’s your example subgraph
156
+
Creates an iterable, each element containing a Graql query, a function to sample the answers, and a QueryGraph
157
+
object which must be the Grakn graph representation of the query. This tuple is termed a "query_handle"
158
+
159
+
Args:
160
+
example_id: A uniquely identifiable attribute value used to anchor the results of the queries to a specific
0 commit comments