Fix: silent exception swallowing loses config in agent adapters#53
Merged
Fix: silent exception swallowing loses config in agent adapters#53
Conversation
509bee1 to
b374a0a
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
The except Exception: pass blocks in smolagents, langgraph, and llamaindex adapters silently swallowed errors during config collection, causing loss of configuration data (including model_id) with no visibility into why. For research code, truthfulness matters more than uptime — let errors propagate so they can be diagnosed and fixed. Also simplified SmolAgentAdapter.gather_config() by removing the manual fallback that partially reconstructed config when to_dict() failed, since the error now surfaces directly.
b374a0a to
fe31b48
Compare
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
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.
Description
The
except Exception: passblocks ingather_config()across smolagents, langgraph, and llamaindex adapters silently swallowed errors during config collection, causing loss of configuration data (including model_id) with no visibility into why.This PR removes those silent catch-all blocks and lets errors propagate. For research code, truthfulness matters more than uptime — failures should be visible so they can be diagnosed and fixed.
Also simplified
SmolAgentAdapter.gather_config()by removing the manual fallback that partially reconstructed config whento_dict()failed, since the error now surfaces directly.Type of Change
Checklist
Contribution
Documentation
docs/(if applicable)Changelog
CHANGELOG.mdunder[Unreleased]sectionArchitecture (if applicable)
maseval/core/do NOT import frommaseval/interface/Additional Notes
All three agent adapters (smolagents, langgraph, llamaindex) had the same pattern of
except Exception: passin their config collection. This PR applies the same fix consistently across all three.