Skip to content

ML Agent Bench crashes when an action omits Action Input #1804

Description

@sylvesterkaczmarek

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:

Action: List Files

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions