Skip to content

Commit

Permalink
Update constants to immutable types.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 692908923
  • Loading branch information
The android_world Authors committed Nov 4, 2024
1 parent f41a3ef commit 302bbbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions android_world/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""Registers the task classes."""

import types
from typing import Any
from typing import Any, Final

from android_world.task_evals import task_eval
from android_world.task_evals.composite import markor_sms
Expand Down Expand Up @@ -60,13 +60,13 @@ class TaskRegistry:
"""Registry of tasks."""

# The AndroidWorld family.
ANDROID_WORLD_FAMILY = 'android_world' # Entire suite.
ANDROID_FAMILY = 'android' # Subset.
INFORMATION_RETRIEVAL_FAMILY = 'information_retrieval' # Subset.
ANDROID_WORLD_FAMILY: Final[str] = 'android_world' # Entire suite.
ANDROID_FAMILY: Final[str] = 'android' # Subset.
INFORMATION_RETRIEVAL_FAMILY: Final[str] = 'information_retrieval' # Subset.

# The MiniWoB family.
MINIWOB_FAMILY = 'miniwob'
MINIWOB_FAMILY_SUBSET = 'miniwob_subset'
MINIWOB_FAMILY: Final[str] = 'miniwob'
MINIWOB_FAMILY_SUBSET: Final[str] = 'miniwob_subset'

# Task registries; they contain a mapping from each task name to its class,
# to construct instances of a task.
Expand Down
8 changes: 4 additions & 4 deletions android_world/task_evals/miniwob/miniwob_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# The names of the HTML files, modulo the .html suffix, corresponding to the
# supported tasks that can be run. All tasks have been verified to be correct
# and achievable on an Android device by a human.
_NAMES = [
_NAMES = (
## Original MiniWoB++ tasks:
# keep-sorted start
'bisect-angle',
Expand Down Expand Up @@ -149,10 +149,10 @@
# 'use-spinner', # Slider implementation not working.
# The menu responsiveness breaks and task does not behave as intended.
# 'click-menu'
]
)

# Subset of tasks used in Synapse paper (https://arxiv.org/pdf/2306.07863.pdf).
_NAMES_SUBSET = [
_NAMES_SUBSET = (
'book-flight',
'choose-date',
'choose-list',
Expand Down Expand Up @@ -217,7 +217,7 @@
'use-autocomplete',
'use-slider',
'use-spinner',
]
)


def _create_class_name(html_file_name: str) -> str:
Expand Down

0 comments on commit 302bbbd

Please sign in to comment.