-
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
Refactor llm iii #365
Refactor llm iii #365
Conversation
mschwoer
commented
Oct 29, 2024
•
edited
Loading
edited
- decouple get_gene_to_prot_id_mapping from session state
- fix bug when calling DimensionalityReduction
- refactor function calling in LLM
@@ -179,24 +181,39 @@ def execute_function( | |||
If the function is not implemented or the dataset is not available | |||
""" | |||
try: | |||
if function_name == "get_gene_function": | |||
# TODO log whats going on |
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.
What happened to this 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.
there's now the option to show the whole conversation
|
||
return self.dataset.plot_intensity(**function_args) | ||
|
||
# fallback: try to find the function in the Dataset functions |
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 whole logic is does not work as well anymore, now that we refactored most methods to no longer be directly available from dataset.
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.
note sure what you mean? all method calls should still work
@@ -153,21 +149,21 @@ def get_assistant_functions( | |||
"parameters": { | |||
"type": "object", | |||
"properties": { | |||
"protein_id": { | |||
"gene_name": { # this will be mapped to "protein_id" when calling the function |
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.
Have you actually tested this? I'm not sure whether you also changed the corresponding function to use gene names instead of protein ids, or the function was wrong before. It should be clear in both instances if it's actually using protein ids or gene names. Generally we should always use protein ids internally, as 1. gene names can change over time, 2. not all uploaded datasets contain gene names.
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.
https://github.com/MannLabs/alphapeptstats/pull/355/files#r1834408990
Found this in the next pr
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.
yes, there's some back-and-forth with this mapping ;-)
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.
LGTM, but please take a look at the comments.