Describe the bug
hr_ml_agent_bench.actions.get_action() returns an Action with args=None when a model emits an action name without an Action Input: block.
is_valid_action() only rejects string arguments, then unconditionally calls:
actual_args = action.args.keys()
so the normal malformed response:
raises AttributeError: 'NoneType' object has no attribute 'keys' instead of being classified as an invalid action and re-prompted by the eval loop.
Expected behavior
Missing or otherwise non-dictionary action arguments should make is_valid_action() return False, not crash the evaluation.
Proposed fix
Require action.args to be a dictionary before comparing argument keys, and add local regression coverage for missing, malformed, and valid action inputs.
Describe the bug
hr_ml_agent_bench.actions.get_action()returns anActionwithargs=Nonewhen a model emits an action name without anAction Input:block.is_valid_action()only rejects string arguments, then unconditionally calls:so the normal malformed response:
raises
AttributeError: 'NoneType' object has no attribute 'keys'instead of being classified as an invalid action and re-prompted by the eval loop.Expected behavior
Missing or otherwise non-dictionary action arguments should make
is_valid_action()returnFalse, not crash the evaluation.Proposed fix
Require
action.argsto be a dictionary before comparing argument keys, and add local regression coverage for missing, malformed, and valid action inputs.