Skip to content

Commit

Permalink
fix(models): remove active_browser_element / available_browser_elements
Browse files Browse the repository at this point in the history
  • Loading branch information
abrichr authored Dec 9, 2024
1 parent d9a21f8 commit 85d601e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 4 additions & 9 deletions openadapt/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,6 @@ def to_prompt_dict(self) -> dict[str, Any]:
Returns:
dictionary containing relevant properties from the ActionEvent.
"""
if self.active_browser_element:
import ipdb

ipdb.set_trace()
action_dict = deepcopy(
{
key: val
Expand All @@ -518,6 +514,9 @@ def to_prompt_dict(self) -> dict[str, Any]:
action_dict["available_segment_descriptions"] = (
self.available_segment_descriptions
)

# TODO:
"""
if self.active_browser_element:
action_dict["active_browser_element"] = str(self.active_browser_element)
if self.available_browser_elements:
Expand All @@ -526,11 +525,7 @@ def to_prompt_dict(self) -> dict[str, Any]:
action_dict["available_browser_elements"] = str(
self.available_browser_elements
)

if self.active_browser_element:
import ipdb

ipdb.set_trace()
"""
return action_dict

@property
Expand Down
4 changes: 3 additions & 1 deletion openadapt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,11 @@ def wrapper_retry(*args: tuple, **kwargs: dict[str, Any]) -> Any:
logger.warning(exc)
exceptions.append(str(exc))
retries += 1
last_exception = exc
# Raise the final exception with a detailed message and keep its traceback
raise RuntimeError(
f"Failed after {max_retries} retries with exceptions: {exceptions}"
)
) from last_exception

return wrapper_retry

Expand Down

0 comments on commit 85d601e

Please sign in to comment.