Skip to content
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

Merged
merged 8 commits into from
Nov 8, 2024
Merged

Refactor llm iii #365

merged 8 commits into from
Nov 8, 2024

Conversation

mschwoer
Copy link
Contributor

@mschwoer mschwoer commented Oct 29, 2024

  • 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
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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 ;-)

Copy link
Collaborator

@JuliaS92 JuliaS92 left a 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.

Base automatically changed from refactor_llm_II to development November 8, 2024 16:35
@mschwoer mschwoer merged commit a27cd95 into development Nov 8, 2024
4 of 5 checks passed
@mschwoer mschwoer deleted the refactor_llm_III branch November 8, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants