Skip to content

Commit

Permalink
set interp on node
Browse files Browse the repository at this point in the history
  • Loading branch information
cbizon committed Jul 16, 2024
1 parent 19666f6 commit 10b082a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,19 +854,21 @@ def get_infer_parameters(input_message):
qualifiers = {}
else:
qualifiers = {"qualifier_constraints": qc}
if ("ids" in input_message["message"]["query_graph"]["nodes"][source]) \
and (input_message["message"]["query_graph"]["nodes"][source]["ids"] is not None):
input_id = input_message["message"]["query_graph"]["nodes"][source]["ids"][0]
member_ids = input_message["message"]["query_graph"]["nodes"][source].get("member_ids",[])
mcq = False
snode = input_message["message"]["query_graph"]["nodes"][source]
tnode = input_message["message"]["query_graph"]["nodes"][target]
if ("ids" in snode) and (snode["ids"] is not None):
input_id = snode["ids"][0]
member_ids = snode.get("member_ids",[])
if "set_interpretation" in snode and snode["set_interpretation"] == "MANY":
mcq = True
source_input = True
else:
input_id = input_message["message"]["query_graph"]["nodes"][target]["ids"][0]
member_ids = input_message["message"]["query_graph"]["nodes"][target].get("member_ids",[])
input_id = tnode["ids"][0]
member_ids = tnode.get("member_ids",[])
if "set_interpretation" in tnode and tnode["set_interpretation"] == "MANY":
mcq = True
source_input = False
mcq = False
if ("set_interpretation" in input_message["message"]["query_graph"] and
input_message["message"]["query_graph"]["set_interpretation"] == "MANY"):
mcq = True
#key = get_key(predicate, qualifiers)
return input_id, predicate, qualifiers, source, source_input, target, query_edge, mcq, member_ids

Expand Down

0 comments on commit 10b082a

Please sign in to comment.