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

use gollm=>mira equation to amr pipeline #5851

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

mwdchang
Copy link
Member

@mwdchang mwdchang commented Dec 16, 2024

Summary

Replace latex => sympy.parse_latex => mira pipeline with latex => gollm => mira pipeline.
This is the 2nd part to: #5846

This PR also clean up the mira-endpoint.
/mira/latex-to-amr => /knowledge/equations-to-model-debug

Testing

POST /knowledge/equations-to-model should return a model-id, which in turn should reflect the equations.

{
  "equations": [
  "\\frac{d S(t)}{d t} = - b_q S(t) I(t)",
  "\\frac{d E(t)}{d t} = b_q S(t) I(t) - r_X E(t)",
  "\\frac{d I(t)}{d t} = r_X E(t) - g_p_q I(t)",
  "\\frac{d R(t)}{d t} = g_p_q I(t)"
   ]
}

Copy link
Member

@YohannParis YohannParis left a comment

Choose a reason for hiding this comment

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

Lovely!

Copy link
Contributor

@Tom-Szendrey Tom-Szendrey left a comment

Choose a reason for hiding this comment

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

why the debug in equations-to-model-debug ?

@mwdchang
Copy link
Member Author

why the debug in equations-to-model-debug ?

@Tom-Szendrey I want to flag it as not meant to be used aside from debugging. The current pipeline is not very transparent, it has 3-4 junctions (llm-enrichment, llm-code-gen, code-eval to sympy, ode-to-amr) where things can go wrong but not really set up to report errors at each stage. Because it is also coupled with SKEMA stuff and model enrichment, and is used as a one-shot model creation process in the UI, it is just not ideal to refactor it until we agree on a more sane process. So for now we have a debugging analog.

@Tom-Szendrey
Copy link
Contributor

why the debug in equations-to-model-debug ?

@Tom-Szendrey I want to flag it as not meant to be used aside from debugging. The current pipeline is not very transparent, it has 3-4 junctions (llm-enrichment, llm-code-gen, code-eval to sympy, ode-to-amr) where things can go wrong but not really set up to report errors at each stage. Because it is also coupled with SKEMA stuff and model enrichment, and is used as a one-shot model creation process in the UI, it is just not ideal to refactor it until we agree on a more sane process. So for now we have a debugging analog.

Thank you for filling me in!

@mwdchang mwdchang merged commit 34e0631 into main Dec 16, 2024
8 checks passed
@mwdchang mwdchang deleted the update-equation-to-model-pipeline branch December 16, 2024 20:24
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.

3 participants