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

Add handler to detect incorrect parameter name #137

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

brandomr
Copy link
Contributor

Resolves DARPA-ASKEM/terarium#3785 (comment)

The issue arose when the user asks an agent to update a parameter that doesn't exist. Instead of notifying the user of the issue, Beaker threw an error.

This PR addresses this by comparing the parameter names supplied by the user against the parameter names in the model before generating the correct parameter update code. If one or more of the parameters that the user supplied do not exist in the model the agent notifies the user.

Screenshot 2024-06-10 at 3 59 35 PM

Side Note: since this loads the model into the Agent's context (not just the user space) we could answer questions about the current parameter/initial condition values without running code...if we wanted to make that update later.

Copy link
Contributor

@mattprintz mattprintz left a comment

Choose a reason for hiding this comment

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

👍

@brandomr brandomr merged commit 8e6f3e0 into main Jun 11, 2024
2 checks passed
@mattprintz mattprintz deleted the model-config-parameter-check branch June 11, 2024 20:02
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.

[BUG]: model configuration notebook test, AI generates bad code
2 participants