Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'Public methods'})

This happened while the json dataset builder was generating data using

zip://api_test/_reference_android_accessibilityservice_AccessibilityButtonController.json::/tmp/hf-datasets-cache/medium/datasets/84386589316289-config-parquet-and-info-xwk123-MobileBench-v1-231e4661/hub/datasets--xwk123--MobileBench-v1/snapshots/4301f1a59db6a36e5693c58e0b933a0ad322ffca/agent_for_ui/agent_for_api/api_test.zip

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              baseurl: string
              Public methods: list<item: struct<api_name: string, method_signature: list<item: string>, table: list<item: list<item: struct<table_title: string, boolean: string, callback: string, handler: string>>>, p: list<item: string>>>
                child 0, item: struct<api_name: string, method_signature: list<item: string>, table: list<item: list<item: struct<table_title: string, boolean: string, callback: string, handler: string>>>, p: list<item: string>>
                    child 0, api_name: string
                    child 1, method_signature: list<item: string>
                        child 0, item: string
                    child 2, table: list<item: list<item: struct<table_title: string, boolean: string, callback: string, handler: string>>>
                        child 0, item: list<item: struct<table_title: string, boolean: string, callback: string, handler: string>>
                            child 0, item: struct<table_title: string, boolean: string, callback: string, handler: string>
                                child 0, table_title: string
                                child 1, boolean: string
                                child 2, callback: string
                                child 3, handler: string
                    child 3, p: list<item: string>
                        child 0, item: string
              to
              {'baseurl': Value(dtype='string', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1417, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1049, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1000, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'Public methods'})
              
              This happened while the json dataset builder was generating data using
              
              zip://api_test/_reference_android_accessibilityservice_AccessibilityButtonController.json::/tmp/hf-datasets-cache/medium/datasets/84386589316289-config-parquet-and-info-xwk123-MobileBench-v1-231e4661/hub/datasets--xwk123--MobileBench-v1/snapshots/4301f1a59db6a36e5693c58e0b933a0ad322ffca/agent_for_ui/agent_for_api/api_test.zip
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

baseurl
string
https://developer.android.google.cn/ndk/reference
https://developer.android.google.cn/reference/android/Manifest
https://developer.android.google.cn/reference/android/Manifest.permission
https://developer.android.google.cn/reference/android/Manifest.permission_group
https://developer.android.google.cn/reference/android/R
https://developer.android.google.cn/reference/android/R.anim
https://developer.android.google.cn/reference/android/R.animator
https://developer.android.google.cn/reference/android/R.array
https://developer.android.google.cn/reference/android/R.attr
https://developer.android.google.cn/reference/android/R.bool
https://developer.android.google.cn/reference/android/R.color
https://developer.android.google.cn/reference/android/R.dimen
https://developer.android.google.cn/reference/android/R.drawable
https://developer.android.google.cn/reference/android/R.fraction
https://developer.android.google.cn/reference/android/R.id
https://developer.android.google.cn/reference/android/R.integer
https://developer.android.google.cn/reference/android/R.interpolator
https://developer.android.google.cn/reference/android/R.layout
https://developer.android.google.cn/reference/android/R.menu
https://developer.android.google.cn/reference/android/R.mipmap
https://developer.android.google.cn/reference/android/R.plurals
https://developer.android.google.cn/reference/android/R.string
https://developer.android.google.cn/reference/android/R.style
https://developer.android.google.cn/reference/android/R.styleable
https://developer.android.google.cn/reference/android/R.transition
https://developer.android.google.cn/reference/android/accessibilityservice/package-summary
https://developer.android.google.cn/reference/android/accounts/AccountsException
https://developer.android.google.cn/reference/android/accounts/AuthenticatorException
https://developer.android.google.cn/reference/android/accounts/NetworkErrorException
https://developer.android.google.cn/reference/android/accounts/OperationCanceledException
https://developer.android.google.cn/reference/android/accounts/package-summary
https://developer.android.google.cn/reference/android/adservices/adid/package-summary
https://developer.android.google.cn/reference/android/adservices/adselection/package-summary
https://developer.android.google.cn/reference/android/adservices/appsetid/package-summary
https://developer.android.google.cn/reference/android/adservices/common/AdServicesPermissions
https://developer.android.google.cn/reference/android/adservices/common/package-summary
https://developer.android.google.cn/reference/android/adservices/customaudience/package-summary
https://developer.android.google.cn/reference/android/adservices/exceptions/AdServicesException
https://developer.android.google.cn/reference/android/adservices/exceptions/package-summary
https://developer.android.google.cn/reference/android/adservices/measurement/package-summary
https://developer.android.google.cn/reference/android/adservices/package-summary
https://developer.android.google.cn/reference/android/adservices/topics/package-summary
https://developer.android.google.cn/reference/android/animation/package-summary
https://developer.android.google.cn/reference/android/annotation/package-summary
https://developer.android.google.cn/reference/android/app/ActionBar.LayoutParams
https://developer.android.google.cn/reference/android/app/AliasActivity
https://developer.android.google.cn/reference/android/app/package-summary
https://developer.android.google.cn/reference/android/arch/core/executor/testing/package-summary
https://developer.android.google.cn/reference/android/arch/core/util/package-summary
https://developer.android.google.cn/reference/android/arch/lifecycle/ViewModel
https://developer.android.google.cn/reference/android/arch/lifecycle/ViewModelProviders.DefaultFactory
https://developer.android.google.cn/reference/android/arch/lifecycle/package-summary
https://developer.android.google.cn/reference/android/arch/packages
https://developer.android.google.cn/reference/android/arch/paging/ItemKeyedDataSource.LoadParams
https://developer.android.google.cn/reference/android/arch/paging/PageKeyedDataSource.LoadInitialParams
https://developer.android.google.cn/reference/android/arch/paging/PageKeyedDataSource.LoadParams
https://developer.android.google.cn/reference/android/arch/paging/PagedList.Config
https://developer.android.google.cn/reference/android/arch/paging/PositionalDataSource.LoadRangeParams
https://developer.android.google.cn/reference/android/arch/paging/package-summary
https://developer.android.google.cn/reference/android/arch/persistence/db/framework/package-summary
https://developer.android.google.cn/reference/android/arch/persistence/room/ColumnInfo.Collate
https://developer.android.google.cn/reference/android/arch/persistence/room/ColumnInfo.SQLiteTypeAffinity
https://developer.android.google.cn/reference/android/arch/persistence/room/Dao
https://developer.android.google.cn/reference/android/arch/persistence/room/Delete
https://developer.android.google.cn/reference/android/arch/persistence/room/EmptyResultSetException
https://developer.android.google.cn/reference/android/arch/persistence/room/Ignore
https://developer.android.google.cn/reference/android/arch/persistence/room/OnConflictStrategy
https://developer.android.google.cn/reference/android/arch/persistence/room/SkipQueryVerification
https://developer.android.google.cn/reference/android/arch/persistence/room/TypeConverter
https://developer.android.google.cn/reference/android/arch/persistence/room/migration/package-summary
https://developer.android.google.cn/reference/android/arch/persistence/room/package-summary
https://developer.android.google.cn/reference/android/arch/persistence/room/testing/package-summary
https://developer.android.google.cn/reference/android/car/CarNotConnectedException
https://developer.android.google.cn/reference/android/car/CarVersion.VERSION_CODES
https://developer.android.google.cn/reference/android/car/EvConnectorType
https://developer.android.google.cn/reference/android/car/FuelType
https://developer.android.google.cn/reference/android/car/GsrComplianceType
https://developer.android.google.cn/reference/android/car/PlatformVersion.VERSION_CODES
https://developer.android.google.cn/reference/android/car/PortLocationType
https://developer.android.google.cn/reference/android/car/VehicleAreaSeat
https://developer.android.google.cn/reference/android/car/VehicleAreaType
https://developer.android.google.cn/reference/android/car/VehicleAreaWheel
https://developer.android.google.cn/reference/android/car/VehicleUnit
https://developer.android.google.cn/reference/android/car/classes
https://developer.android.google.cn/reference/android/car/content/pm/package-summary
https://developer.android.google.cn/reference/android/car/drivingstate/CarUxRestrictions.CarUxRestrictionsInfo
https://developer.android.google.cn/reference/android/car/drivingstate/package-summary
https://developer.android.google.cn/reference/android/car/hardware/CarPropertyValue.PropertyStatus
https://developer.android.google.cn/reference/android/car/hardware/CarSensorEvent.EnvironmentData
https://developer.android.google.cn/reference/android/car/hardware/package-summary
https://developer.android.google.cn/reference/android/car/hardware/power/PowerComponent
https://developer.android.google.cn/reference/android/car/hardware/power/package-summary
https://developer.android.google.cn/reference/android/car/hardware/property/CarInternalErrorException
https://developer.android.google.cn/reference/android/car/hardware/property/PropertyAccessDeniedSecurityException
https://developer.android.google.cn/reference/android/car/hardware/property/PropertyNotAvailableAndRetryException
https://developer.android.google.cn/reference/android/car/hardware/property/PropertyNotAvailableException
https://developer.android.google.cn/reference/android/car/hardware/property/VehicleElectronicTollCollectionCardStatus
https://developer.android.google.cn/reference/android/car/hardware/property/VehicleElectronicTollCollectionCardType
https://developer.android.google.cn/reference/android/car/hardware/property/package-summary
https://developer.android.google.cn/reference/android/car/media/CarMediaIntents
End of preview.
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

Mobile Bench Environment Setup Guide

My Local Image

Paper link:

Mobile-Bench: An Evaluation Benchmark for LLM-based Mobile Agents

1. Required Software Versions

  • OS: Ubuntu 18.04
  • Python: Python 3.9.11 [Python-3.9.11.tgz]
  • Android Studio: Android Studio 2022.3.1.21 [android-studio-2022.3.1.21-linux.tar.gz]
  • Appium: Appium 1.18.3 [Appium-linux-1.18.3.AppImage]
  • MIUI Emulator: miui 1.0.1 [MIUIAndroidEmulator-1.0.1.zip]

Note: Ensure the Android, Appium, and MIUI versions are strictly aligned; otherwise, the environment may not start properly.


2. Android Studio Installation

  • Download the Android Studio package: android-studio-2022.3.1.21-linux.tar.gz
  1. Extract the package:
    tar -xvf android-studio-2022.3.1.21-linux.tar.gz
  2. Navigate to the bin folder:
    cd android-studio/bin
  3. Run the installer:
    ./studio.sh
  4. Select "standard" and SDK version 34, no need to install the emulator.
  5. Open Android Studio and verify that the SDK directory is properly configured:
    Go to Tools -> SDK Manager.

My Local Image1

3. Java Environment Setup

  • JAVA_HOME: The JDK installation path is typically located in /usr/lib/jvm/.
  • ANDROID_HOME: The Android SDK path is typically in /home/<username>/Android/Sdk. Verify the location through Android Studio -> Tools -> SDK Manager.

Configuration steps:

  1. Open the bashrc file:
    sudo gedit ~/.bashrc

  2. Add the following environment variables (modify according to your actual paths):

    export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export ANDROID_HOME=/home/<username>/Android/Sdk
    export PATH=$ANDROID_HOME/bin:$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    
  3. Save and close the file, then reload bashrc:
    source ~/.bashrc

  4. Verify the Java environment:
    echo $JAVA_HOME

Appium Configuration: Appium may not have sufficient permissions after setup, so configure it accordingly:

  1. Open Edit Configuration
  2. Import environment variables.

My Local Image2

4. MIUI Installation (Real devices are recommended for better performance)

  1. Download MIUI 1.0.1.

  2. Open Android Studio: Files -> Settings -> Plugins -> Settings (top right corner) -> INSTALL PLUGIN FROM DISK. Select the downloaded MIUI package and wait for the emulator to install.

  3. The first-time setup of the emulator takes around 10 minutes. Emulator files are stored in /usr/.miui. To reset the configuration, delete this folder.

  4. Enable developer mode on your phone:
    Go to Settings -> My Device -> Tap System Version multiple times.

  5. Enable USB debugging:
    Go to More Settings -> Developer Options and enable both USB Debugging and Install via USB.

  6. Connect the device to Appium: Ensure that the device's name is recognized properly, and remove any unnecessary prefixes.

  7. Create a backup snapshot to prevent crashes: Backup files are stored in /usr/.miui/avd/snapshots.

  8. Start the MIUI emulator using the following command:

    /home/<username>/.miui/emulator/emulator -avd miui_emulator_phone_34 -sysdir /home/<username>/.miui/system-images/android-34/miui_emulator_phone_34/xiaomix86_64
    
  9. For real devices: Connect the device via USB and enable USB debugging on the phone.


5. ADB Installation

ADB is installed with the SDK, but the version might not match. Use ADB version 41.

  1. Download ADB version 41: platform-tools_r34.0.5-linux.zip
  2. Extract and replace the original ADB executable. Be sure to back up the original.
  3. Check the version by running:
    adb --version
  4. When the emulator is running, check if the device is connected:
    adb devices (should show emulator-5554).

6. Python Environment Setup

  • Install required packages:
    pip install Appium-Python-Client -i https://pypi.tuna.tsinghua.edu.cn/simple

    If open_driver(desired_caps) throws an error, downgrade Appium-Python-Client to version 1.3.0.

Required packages (requirements.txt):

aligo==6.1.14
annotated-types==0.6.0
anyio==4.2.0
anytree==2.12.1
Appium-Python-Client==1.3.0
attrs==23.2.0
backoff==2.2.1
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
coloredlogs==15.0.1
cryptography==42.0.2
datclass==0.2.27
distro==1.9.0
exceptiongroup==1.2.0
h11==0.14.0
httpcore==1.0.2
httpx==0.26.0
humanfriendly==10.0
idna==3.6
numpy==1.26.4
openai==1.12.0
outcome==1.3.0.post0
pillow==10.2.0
protobuf==4.25.2
psutil==5.9.8
pycparser==2.21
pydantic==2.6.1
pyOpenSSL==24.0.0
pypng==0.20220715.0
PySocks==1.7.1
qrcode==7.4.2
qrcode-terminal==0.8
requests==2.31.0
selenium==3.141.0
six==1.16.0
sniffio==1.3.0
sortedcontainers==2.4.0
tqdm==4.66.1
trio==0.24.0
trio-websocket==0.11.1
typing_extensions==4.9.0
urllib3==1.26.18
urllib3-secure-extra==0.1.0
wsproto==1.2.0
  • Install Node.js and Appium:

    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt-get install -y nodejs
    sudo apt install npm
    npm install -g [email protected]
    
  • Install graphical libraries:
    sudo apt-get install xorg

  • Activate the Python virtual environment:
    source /path/to/new/virtual/environment/bin/activate

  • Install Appium Python Client 1.3.0:
    pip install Appium-Python-Client==1.3.0


7. Test Application Configuration

  1. Software Requirements: MobileBench tests need real-world environments. Therefore, ensure that all required apps are pre-installed on the device and that the user is logged in. It is recommended to place the apps directly on the home screen for easier access during testing. Avoid placing apps under folders labeled "Recommended" or "Hot," as this increases the difficulty for the model to locate the app.

  2. Data Preparation: Since the test requires access to system apps, make sure the device has at least 3 contacts, SMS records, diary entries, memo information, and 3 photos.


8. Baseline Code Explanation

  1. The main themes of the code are agent_for_api and agent_for_ui. The main program is main_for_ui.py. APIs are listed in api_list.json, and there are two prompt files: agent_html_prompt.py and agent_api_prompt.py. The xml_to_html.py file handles structured text generation.

  2. Since the testing process requires resetting the environment before each task, there are two solutions:

    • Return to the main screen (effective for single app testing).
    • Clear background processes. However, this might cause socket hang-ups, which is currently unresolved.
  3. The test case difficulty may be related to the actual data stored on the phone. If the required information cannot be found on the phone, the task may fail.

  4. App versions can influence test results. It is recommended to base baseline experiments on the actual test outcomes.


My Local Image3

9.Demos

For the query: Please book me a flight to Beijing next Friday. You need to pay extra attention to the hotel, weather and itinerary.

Download video

10.License

Copyright (C) 2024 Xiaomi Corporation.

The code in this project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The dataset included in this project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

And it is copyrighted by [Xiaomi Corporation] and is used under the terms specified by the dataset provider. Please refer to the dataset license for specific usage rights and restrictions.

For any commercial usage or redistribution of the dataset, please contact the copyright holder.

Summary of Terms

  • Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made.
  • NonCommercial: You may not use the material for commercial purposes.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

License Badge

License: CC BY-NC-SA 4.0

11.Citation

If you'd like to use our benchmark or cite this paper, please kindly use the reference below:

@article{deng2024mobile,
  title={Mobile-bench: An evaluation benchmark for llm-based mobile agents},
  author={Deng, Shihan and Xu, Weikai and Sun, Hongda and Liu, Wei and Tan, Tao and Liu, Jianfeng and Li, Ang and Luan, Jian and Wang, Bin and Yan, Rui and others},
  journal={arXiv preprint arXiv:2407.00993},
  year={2024}
}

If you have any questions, please contact [email protected]

Downloads last month
83