-
Notifications
You must be signed in to change notification settings - Fork 31
No eval shortcut #152
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
Merged
Merged
No eval shortcut #152
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Raises FileNotFoundError if system_prompt_template_file not found
…ustom JSON filter
…nfiguration files
xingdi-eric-yuan
approved these changes
Jun 12, 2025
MarcCote
reviewed
Jun 12, 2025
MarcCote
approved these changes
Jun 12, 2025
Default dict template
MarcCote
approved these changes
Jun 12, 2025
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.
Awesome, I love the new template for human mode thanks.
xingdi-eric-yuan
approved these changes
Jun 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements to the
debug-gym
framework, focusing on customizable system prompts, improved agent behavior, and codebase simplifications. The changes include adding support for Jinja templates in system prompts, introducing new utility methods for agents, and simplifying theinstructions
property in various environments.Customizable System Prompts
to_pretty_json
andtrim_message
were introduced to enhance template functionality. ([[1]](https://github.com/microsoft/debug-gym/pull/152/files#diff-769a128278122d779780df5a3a6a2d1ffa96e793d619dec71d091bf21368824eL75-R188)
,[[2]](https://github.com/microsoft/debug-gym/pull/152/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L140-R222)
,[[3]](https://github.com/microsoft/debug-gym/pull/152/files#diff-34ea40c6da6f40f445b3eafff912f32342156241356dd99a856f22ace2d24a06R36-R37)
,[[4]](https://github.com/microsoft/debug-gym/pull/152/files#diff-9ebc73ddba89145d2c3c0d2a7a35c2fc03a4306bc810bc01c3edac0e4dcd96a7R35-R36)
,[[5]](https://github.com/microsoft/debug-gym/pull/152/files#diff-8b1170dceb4870f28ae9f00425abdbd14207448da847fcfdc58087e399ff5cceR35-R36)
)README.md
to explain how to use Jinja templates for system prompts, including examples and details about custom filters. ([README.mdL140-R222](https://github.com/microsoft/debug-gym/pull/152/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L140-R222)
)Agent Enhancements
build_system_prompt
method to use either a Jinja template or a default JSON-based format. Added utility methods likeshortcut_features
and_auto_eval_on_rewrite
for better modularity. ([debug_gym/agents/base_agent.pyL75-R188](https://github.com/microsoft/debug-gym/pull/152/files#diff-769a128278122d779780df5a3a6a2d1ffa96e793d619dec71d091bf21368824eL75-R188)
)_load_system_prompt_template
method to handle loading and validating custom templates. ([debug_gym/agents/base_agent.pyL75-R188](https://github.com/microsoft/debug-gym/pull/152/files#diff-769a128278122d779780df5a3a6a2d1ffa96e793d619dec71d091bf21368824eL75-R188)
)Environment Simplifications
instructions
property across multiple environments (AiderBenchmarkEnv
,MiniNightmareEnv
,SWEBenchEnv
) to return a plain string instead of a dictionary. ([[1]](https://github.com/microsoft/debug-gym/pull/152/files#diff-0fd30e53ec10b12a89fd527c14c2d8c898af0b24e565ac866877c8c6e322e0f5L15-R16)
,[[2]](https://github.com/microsoft/debug-gym/pull/152/files#diff-0c9839d137c9c2cedc011109ff42d57f42e819ec862b943a5df9da45f86782f8L25-R26)
,[[3]](https://github.com/microsoft/debug-gym/pull/152/files#diff-14c661bab81e165fba55704ca88ccbf72e3a1a1f5c528ff9857527106d3f34ddL54-R55)
)instructions
by default. ([debug_gym/gym/envs/env.pyL275-R276](https://github.com/microsoft/debug-gym/pull/152/files#diff-dd500acaa499f131456c6cd77f9310117f349f19f869fc0fcb4279f71025f108L275-R276)
)Configuration Updates
system_prompt_template_file
field in configuration files to specify custom Jinja templates. ([[1]](https://github.com/microsoft/debug-gym/pull/152/files#diff-34ea40c6da6f40f445b3eafff912f32342156241356dd99a856f22ace2d24a06R36-R37)
,[[2]](https://github.com/microsoft/debug-gym/pull/152/files#diff-9ebc73ddba89145d2c3c0d2a7a35c2fc03a4306bc810bc01c3edac0e4dcd96a7R35-R36)
,[[3]](https://github.com/microsoft/debug-gym/pull/152/files#diff-8b1170dceb4870f28ae9f00425abdbd14207448da847fcfdc58087e399ff5cceR35-R36)
)auto_eval_on_rewrite
toFalse
in multiple configuration files to give users more control over evaluation behavior. ([[1]](https://github.com/microsoft/debug-gym/pull/152/files#diff-34ea40c6da6f40f445b3eafff912f32342156241356dd99a856f22ace2d24a06L11-R11)
,[[2]](https://github.com/microsoft/debug-gym/pull/152/files#diff-9ebc73ddba89145d2c3c0d2a7a35c2fc03a4306bc810bc01c3edac0e4dcd96a7L11-R11)
,[[3]](https://github.com/microsoft/debug-gym/pull/152/files#diff-8b1170dceb4870f28ae9f00425abdbd14207448da847fcfdc58087e399ff5cceL11-R11)
)Codebase Cleanup
[[1]](https://github.com/microsoft/debug-gym/pull/152/files#diff-872c89cb5a43ebc1e36269426eb653c84080edcbb0134bcc946b3a788cf09b47L2)
,[[2]](https://github.com/microsoft/debug-gym/pull/152/files#diff-7f81de762adcd06df31fbac17be81b87332a901ff68f36e232e12d25b754ab92L1-L5)
)