Skip to content

Conversation

@zzjchen
Copy link

@zzjchen zzjchen commented Oct 24, 2024

The original ElementEvaluator path_exact_match uses selectors to indicate if the element of an input action matches that of an evaluation step.

The shortcomings are:

  1. It's hard for pixel or coordinate-based agents to identify a selector to the correct element.
  2. The original code has a bad implementation: it traces up at most 3 times for the parent of the reference selector at a max depth of 3, if the input selector does not match the reference selector in the evaluation step.

In this PR, I use an alternative way:

  • Calculate the bounding box of the reference selector
  • See if the coordinate of action taken by agents is inside the bounding box. If so, means exact match; otherwise, means not match.

What this PR does not include:

  • Implement how to acquire the coordinate of actions for coordinate or pixel-based agents. They need to add "input_coords" argument when calling the "step_evaluate" function. e.g. here in evaluate_utils.py

Note (not sure if it exists in data):
For some cases, the reference element selector needs relabeling, such that the reference element selector's bounding box covers all pixel space which can lead to correct action.

This may occur when the reference selector in the evaluation step is the "deepest". For example, if the reference selector points to a huge button with a small text on it, and the reference selector in the evaluation step points to the text. Clicking the blank spaces of the button may fail this coordinate based eval.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant