-
Notifications
You must be signed in to change notification settings - Fork 1
Resolve m types #351
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
base: main
Are you sure you want to change the base?
Resolve m types #351
Conversation
I am wondering whether we should not modify some (or all) of the However, please feel free to challenge the above. |
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.
I am still debating whether those resolving tools should coexist with their GET ALL
counterpart in entity core. At some point having both is not the most useful imo and we should either find a way to unify them, or get rid of one. Thanks for the PR anyway !
if m_types_response["pagination"]["total_items"] > page_size: | ||
raise ValueError( | ||
"Not all m-types were retreived, please increase the page size." | ||
) | ||
|
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.
I suggest we paginate instead of raising an error. For instance, we can remove the -p
argument from the argparse, set manually a page_size
and do something along the lines of:
retrieved_items = []
page = 1
while m_types_response["pagination"]["total_items"] > len(retrieved_items):
response = await httpx_client.get(..., params={"page_size": page_size, "page": page}
retrieved_items.extend(...)
page += 1
# Gather the names | ||
pref_labels = [m_types.pref_label for m_types in m_types.mtypes] |
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.
Did we ever get an answer from Daniela about what field scientists will use to search for an mtype ?
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.
Not really, I guess there are more important things to work on for CNS
] = """Resolve the mtype pref label from natural english to its corresponding ID (formated ad UUID) using semantic search. | ||
Accepts natural language inputs containing the full or partial name. If no exact match is found, returns the best scored candidates.""" |
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.
I am not sure if the LLM knows what the pref_label
is. Not sure how I would say it better though.
We discussed this privately and we decided not to move forward with resolution tools. So @BoBer78 sorry for the extra work but I think we can just close this PR. |
Sure, let's maybe wait for a discussion with JDC to know how we proceed with the resolving. Then we close this PR. |
closes #338