-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Set default value of use_microagents to False to prevent breaking eval #5976
Conversation
openhands/core/cli.py
Outdated
@@ -116,6 +116,7 @@ async def main(loop): | |||
|
|||
agent_cls: Type[Agent] = Agent.get_cls(config.default_agent) | |||
agent_config = config.get_agent_config(config.default_agent) | |||
agent_config.use_microagents = True # hard-coded to true since it is user-facing |
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 means it doesn't obey the config.toml
value, though. 🤔
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.
Hmm that's true.. Do you think maybe we can just leave this one off for ppl?
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.
We can:
- go the other way around, set it to False in evals and let it configurable for the rest
- if that's becoming too much to change in evals code when we have such issue, maybe we can restore the idea we were using before, to write a
config.toml
for evals
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.
hmm maybe we should turn this off in eval then!
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.
Openhands fix success summary
The AI has successfully incorporated the feedback by making changes that:
- Remove the hard-coded
use_microagents = True
from the CLI code - Set
use_microagents=False
explicitly in all evaluation benchmarks
This directly addresses the feedback requesting to "turn this off in eval" while maintaining the functionality elsewhere. The solution is comprehensive as it:
- Respects the config.toml values by removing hard-coding
- Explicitly disables microagents in evaluation contexts
- Maintains the feature for non-evaluation use cases
The changes can be summarized for a reviewer as:
"Modified the code to explicitly disable microagents in evaluation benchmarks while maintaining the feature for general use. Removed hard-coding from CLI to respect configuration values, and added explicit use_microagents=False
settings in all evaluation benchmark configurations."
@@ -27,7 +27,7 @@ class AgentConfig: | |||
memory_enabled: bool = False | |||
memory_max_threads: int = 3 | |||
llm_config: str | None = None | |||
use_microagents: bool = True | |||
use_microagents: bool = False |
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.
I think this should default to True, and that eval should override it.
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.
Openhands fix success summary
The feedback has been successfully incorporated. The AI made the following changes:
- Changed the default value of
use_microagents
fromFalse
toTrue
in the agent configuration file - Removed hard-coded override in the CLI to respect the configuration value
- Added explicit overrides in all evaluation benchmarks to set
use_microagents=False
This directly addresses the feedback request that the feature should default to True but be overridden in evaluation contexts. The changes are comprehensive and maintain consistency across the codebase while implementing the requested behavior.
The explanation provided by the AI clearly outlines the changes made and confirms they align with the feedback requirements. This can be confidently marked as resolved.
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.
I disagree with the change here. I think it's eval's responsibility to turn this off
sorry didn't mean to close! |
OpenHands agent if you see this, please read the diff against main first to understand the purpose of the change. Then, you should revert existing changes, and manually set |
…t breaking eval
Overview of Changes: All issues appear to have been successfully resolved. The changes address two main requirements:
Status: ✓ FULLY RESOLVED |
@rbren this should be ready for another look! |
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!
@@ -55,6 +55,8 @@ def get_config( | |||
workspace_mount_path=None, | |||
) | |||
config.set_llm_config(metadata.llm_config) | |||
agent_config = config.get_agent_config(metadata.agent_class) |
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 probably a better way to DRY this out, but I'm not familiar enough with eval. E.g. maybe a shared config.toml? I dunno
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.
I think it was intentional to explicitly write these out - so eval is not gonna be mysteriously impacted by a local config.toml
(which did happen in the early days and took me a while to figure out 😢 )
#5976) Co-authored-by: openhands <[email protected]>
End-user friendly description of the problem this fixes or functionality that this introduces
Give a summary of what the PR does, explaining any non-trivial design decisions
Unintentionally, use_microagent was default to True in evaluations, which is definitely unintended and can potentially hurt results there (eg we don't need to mess with github in evaluation setting).
This PR set the default use_microagents value to false across the system, but do enable it for session (used by UI) and CLI.
For evaluation that actually use this, it is easy to re-enable this by tweaking config.
Tested: microagent still work for UI
Link of any specific issues this addresses
To run this PR locally, use the following command: